diff options
-rw-r--r-- | src/db/sysdb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/db/sysdb.c b/src/db/sysdb.c index 053094311..0b02e9fa1 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; } |