libsmbconf: add a check for talloc failure to smbconf_txt_init().
authorMichael Adam <obnox@samba.org>
Sun, 13 Apr 2008 14:34:40 +0000 (16:34 +0200)
committerMichael Adam <obnox@samba.org>
Sun, 13 Apr 2008 18:04:44 +0000 (20:04 +0200)
Michael

source/lib/smbconf/smbconf_txt_simple.c

index 968860eaa8ff8008907a8492c70cc1db62703b97..b3e977077646e08847c03c8dfb854060985efcee 100644 (file)
@@ -223,6 +223,9 @@ static WERROR smbconf_txt_init(struct smbconf_ctx *ctx, const char *path)
        }
 
        ctx->data = TALLOC_ZERO_P(ctx, struct txt_private_data);
+       if (ctx->data == NULL) {
+               return WERR_NOMEM;
+       }
 
        return WERR_OK;
 }