diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2011-03-23 10:29:09 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-03-23 10:58:57 -0400 |
commit | 1972fddb2e375787dfa87c77190346d7c8e2dbd3 (patch) | |
tree | 19fcb32b6034e86151856b21036d34ea64707160 | |
parent | dfdad4fa71f0a75e8a8494f5c919ffd8fe2a2959 (diff) | |
download | sssd-1972fddb2e375787dfa87c77190346d7c8e2dbd3.tar.gz sssd-1972fddb2e375787dfa87c77190346d7c8e2dbd3.tar.xz sssd-1972fddb2e375787dfa87c77190346d7c8e2dbd3.zip |
Don't crash on error if _name parameter unspecified
Coverity 10738
-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; } |