aboutsummaryrefslogtreecommitdiffstats
path: root/pc/popen.c
diff options
context:
space:
mode:
Diffstat (limited to 'pc/popen.c')
-rw-r--r--pc/popen.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pc/popen.c b/pc/popen.c
index 28e1ebd5..77cedc15 100644
--- a/pc/popen.c
+++ b/pc/popen.c
@@ -86,7 +86,10 @@ scriptify(char *command)
}
slashify(name, p);
if (! (i = unixshell(p))) {
- realloc(name, strlen(name) + 5);
+ char *p = (char *) realloc(name, strlen(name) + 5);
+ if (p == NULL)
+ return NULL;
+ name = p;
strcat(name, ".bat");
}
if (s) sprintf(cmd + strlen(cmd), " %cc ", unixshell(s) ? '-' : '/');