From 94a104f808e76c19b33a3a63f3b637b1475d8c17 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Wed, 13 Jun 2012 15:08:05 +0200 Subject: sss_names_init: Report correct error code if allocation failed --- src/util/usertools.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/util/usertools.c b/src/util/usertools.c index 7675585ea..a3d210e36 100644 --- a/src/util/usertools.c +++ b/src/util/usertools.c @@ -70,7 +70,10 @@ int sss_names_init(TALLOC_CTX *mem_ctx, struct confdb_ctx *cdb, talloc_set_destructor(ctx, sss_names_ctx_destructor); tmpctx = talloc_new(NULL); - if (tmpctx == NULL) goto done; + if (tmpctx == NULL) { + ret = ENOMEM; + goto done; + } conf_path = talloc_asprintf(tmpctx, CONFDB_DOMAIN_PATH_TMPL, domain); if (conf_path == NULL) { -- cgit