summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-06-11 20:56:18 +0000
committerJeremy Allison <jra@samba.org>2001-06-11 20:56:18 +0000
commitf5197e023073d23166d51e2522b380a2d9c5e5a1 (patch)
tree512e363519b436f8c3e5925410925babe4dd9a64
parentda9963e66bd0e262f40ece33a137ba3bc64a1a24 (diff)
downloadsamba-f5197e023073d23166d51e2522b380a2d9c5e5a1.tar.gz
samba-f5197e023073d23166d51e2522b380a2d9c5e5a1.tar.bz2
samba-f5197e023073d23166d51e2522b380a2d9c5e5a1.zip
Fixed potential free of NULL found by SGI speedshop.
Jeremy. (This used to be commit fc7830eec8f5478fc3d3296bb35cb11c94e7d9fa)
-rw-r--r--source3/tdb/tdb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/tdb/tdb.c b/source3/tdb/tdb.c
index 5f8b35b065..4d4fb79383 100644
--- a/source3/tdb/tdb.c
+++ b/source3/tdb/tdb.c
@@ -1227,7 +1227,8 @@ int tdb_store(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf, int flag)
ret = -1;
}
out:
- free(p);
+ if (p)
+ free(p);
tdb_unlock(tdb, BUCKET(hash), F_WRLCK);
return ret;
}