[redhat-lspp] device allocator patch: deadcode

Debora Velarde dvelarde at us.ibm.com
Wed Jun 28 01:13:36 UTC 2006


Below is a patch for a deadcode bug found by Coverity.

Function will only get to error_out if policy_string is not NULL.
Therefore the check on line 198 will always fail and line 199 will never 
be executed.


--- dev_allocator/lib/parse.c.orig      2006-06-27 09:11:08.000000000 
-0500
+++ dev_allocator/lib/parse.c   2006-06-27 09:13:55.000000000 -0500
@@ -195,8 +195,6 @@
 error_out:
        if (conf_file)
                fclose(conf_file);
-       if (policy_string)
-               free(policy_string);
        return NULL;
 }
 







More information about the redhat-lspp mailing list