summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-05-27 17:02:02 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-05-28 10:04:46 +0200
commit2c325236be3d16c200ba4f85d8f0a33b3c5d8e73 (patch)
tree5eb90b52d36fbc3d95fde75fa2e2954f1738d825 /source4/lib
parent8ddb4f6c84b431854a21825f2663d41878adf4ee (diff)
downloadsamba-2c325236be3d16c200ba4f85d8f0a33b3c5d8e73.tar.gz
samba-2c325236be3d16c200ba4f85d8f0a33b3c5d8e73.tar.bz2
samba-2c325236be3d16c200ba4f85d8f0a33b3c5d8e73.zip
s4:regshell - fix an "asprintf"
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/registry/tools/regshell.c6
1 files changed, 5 insertions, 1 deletions
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 :-( */