summaryrefslogtreecommitdiffstats
path: root/source3/tdb/tdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/tdb/tdb.c')
-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 5f8b35b0658..4d4fb79383e 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;
}