summaryrefslogtreecommitdiff
path: root/src/db/sysdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/db/sysdb.c')
-rw-r--r--src/db/sysdb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/db/sysdb.c b/src/db/sysdb.c
index 05309431..0b02e9fa 100644
--- a/src/db/sysdb.c
+++ b/src/db/sysdb.c
@@ -244,14 +244,14 @@ errno_t sysdb_get_rdn(struct sysdb_ctx *ctx, void *memctx,
val = ldb_dn_get_rdn_val(dn);
if (val == NULL) {
ret = EINVAL;
- talloc_free(*_name);
+ if (_name) talloc_free(*_name);
goto done;
}
*_val = talloc_strndup(memctx, (char *) val->data, val->length);
if (!*_val) {
ret = ENOMEM;
- talloc_free(*_name);
+ if (_name) talloc_free(*_name);
goto done;
}