Fix Coverity ID 472
authorVolker Lendecke <vl@samba.org>
Sun, 23 Mar 2008 17:08:13 +0000 (18:08 +0100)
committerVolker Lendecke <vl@samba.org>
Sun, 23 Mar 2008 17:28:24 +0000 (18:28 +0100)
Simo, S4 also has this code. You might want to cherry-pick.

Volker

source/lib/ldb/tools/ldbedit.c

index f8d180495b48c18c10bd39fb7686e5a87e96afb2..0e1fd38e4c08d0e21ae97a485b56a022104e7973 100644 (file)
@@ -319,12 +319,10 @@ int main(int argc, const char **argv)
 
        do_edit(ldb, result->msgs, result->count, options->editor);
 
-       if (result) {
-               ret = talloc_free(result);
-               if (ret == -1) {
-                       fprintf(stderr, "talloc_free failed\n");
-                       exit(1);
-               }
+       ret = talloc_free(result);
+       if (ret == -1) {
+               fprintf(stderr, "talloc_free failed\n");
+               exit(1);
        }
 
        talloc_free(ldb);