From: Volker Lendecke Date: Sun, 23 Mar 2008 17:08:13 +0000 (+0100) Subject: Fix Coverity ID 472 X-Git-Tag: samba-3.3.0pre1~3143 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=94c29f55937e50dcf49124d28ad4e82c7fb4133e;p=thirdparty%2Fsamba.git Fix Coverity ID 472 Simo, S4 also has this code. You might want to cherry-pick. Volker --- diff --git a/source/lib/ldb/tools/ldbedit.c b/source/lib/ldb/tools/ldbedit.c index f8d180495b4..0e1fd38e4c0 100644 --- a/source/lib/ldb/tools/ldbedit.c +++ b/source/lib/ldb/tools/ldbedit.c @@ -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);