From 3d28e7533f4513643762de5768f44b63033bca27 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 23 Mar 2008 18:08:13 +0100 Subject: Fix Coverity ID 472 Simo, S4 also has this code. You might want to cherry-pick. Volker (This used to be commit 94c29f55937e50dcf49124d28ad4e82c7fb4133e) --- source3/lib/ldb/tools/ldbedit.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/source3/lib/ldb/tools/ldbedit.c b/source3/lib/ldb/tools/ldbedit.c index f8d180495b..0e1fd38e4c 100644 --- a/source3/lib/ldb/tools/ldbedit.c +++ b/source3/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); -- cgit