X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Fstored%2Fstatus.c;h=14f99b2639f957e286f7cd2e603d505267bad410;hb=380690412c2a367f04d7e905479ed623c0281b04;hp=d9b4f05028dd98b5d229bf5fb10d34a02bcd6ac3;hpb=74775de4dd024d8327a6925d4448b3dcd774f965;p=bacula%2Fbacula diff --git a/bacula/src/stored/status.c b/bacula/src/stored/status.c index d9b4f05028..14f99b2639 100644 --- a/bacula/src/stored/status.c +++ b/bacula/src/stored/status.c @@ -425,17 +425,18 @@ static void sendit(const char *msg, int len, void *arg) int qstatus_cmd(JCR *jcr) { BSOCK *dir = jcr->dir_bsock; - char *time; + POOLMEM *time; JCR *njcr; s_last_job* job; - time = (char *) alloca(dir->msglen+1); + time = get_memory(dir->msglen+1); if (sscanf(dir->msg, qstatus, time) != 1) { pm_strcpy(&jcr->errmsg, dir->msg); Jmsg1(jcr, M_FATAL, 0, _("Bad .status command: %s\n"), jcr->errmsg); bnet_fsend(dir, "3900 Bad .status command, missing argument.\n"); bnet_sig(dir, BNET_EOD); + free_memory(time); return 0; } unbash_spaces(time); @@ -463,9 +464,11 @@ int qstatus_cmd(JCR *jcr) Jmsg1(jcr, M_FATAL, 0, _("Bad .status command: %s\n"), jcr->errmsg); bnet_fsend(dir, "3900 Bad .status command, wrong argument.\n"); bnet_sig(dir, BNET_EOD); + free_memory(time); return 0; } bnet_sig(dir, BNET_EOD); + free_memory(time); return 1; }