From f5197e023073d23166d51e2522b380a2d9c5e5a1 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 11 Jun 2001 20:56:18 +0000 Subject: Fixed potential free of NULL found by SGI speedshop. Jeremy. (This used to be commit fc7830eec8f5478fc3d3296bb35cb11c94e7d9fa) --- source3/tdb/tdb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3') 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; } -- cgit