From 2c325236be3d16c200ba4f85d8f0a33b3c5d8e73 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Thu, 27 May 2010 17:02:02 +0200 Subject: s4:regshell - fix an "asprintf" --- source4/lib/registry/tools/regshell.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source4/lib/registry') diff --git a/source4/lib/registry/tools/regshell.c b/source4/lib/registry/tools/regshell.c index d25fee14fd..993fe3d791 100644 --- a/source4/lib/registry/tools/regshell.c +++ b/source4/lib/registry/tools/regshell.c @@ -622,7 +622,11 @@ int main(int argc, char **argv) while (true) { char *line, *prompt; - asprintf(&prompt, "%s\\%s> ", ctx->predef?ctx->predef:"", ctx->path); + if (asprintf(&prompt, "%s\\%s> ", ctx->predef?ctx->predef:"", + ctx->path) < 0) { + ret = false; + break; + } current_key = ctx->current; /* No way to pass a void * pointer via readline :-( */ -- cgit