summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2011-03-23 10:29:09 -0400
committerStephen Gallagher <sgallagh@redhat.com>2011-03-23 10:58:57 -0400
commit1972fddb2e375787dfa87c77190346d7c8e2dbd3 (patch)
tree19fcb32b6034e86151856b21036d34ea64707160 /src
parentdfdad4fa71f0a75e8a8494f5c919ffd8fe2a2959 (diff)
downloadsssd-1972fddb2e375787dfa87c77190346d7c8e2dbd3.tar.gz
sssd-1972fddb2e375787dfa87c77190346d7c8e2dbd3.tar.xz
sssd-1972fddb2e375787dfa87c77190346d7c8e2dbd3.zip
Don't crash on error if _name parameter unspecified
Coverity 10738
Diffstat (limited to 'src')
-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 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;
}