From: Eric Bollengier Date: Mon, 7 Feb 2022 18:05:25 +0000 (+0100) Subject: Tweak malloc/bmalloc call in filed/job.c X-Git-Tag: Release-11.3.2~295 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0eb74570834112bf21076a21899bf631ba0b49a9;p=thirdparty%2Fbacula.git Tweak malloc/bmalloc call in filed/job.c --- diff --git a/bacula/src/filed/job.c b/bacula/src/filed/job.c index 09713d29a..7023f6104 100644 --- a/bacula/src/filed/job.c +++ b/bacula/src/filed/job.c @@ -1258,7 +1258,7 @@ static int restore_object_cmd(JCR *jcr) return dir->fsend(OKRestoreObject); } - rop.plugin_name = (char *)malloc(dir->msglen); + rop.plugin_name = (char *)bmalloc(dir->msglen); *rop.plugin_name = 0; if (sscanf(dir->msg, restoreobjcmd, &rop.JobId, &rop.object_len, @@ -1582,7 +1582,7 @@ int add_regex_to_fileset(JCR *jcr, const char *item, int type) int rc; char prbuf[500]; - preg = (regex_t *)malloc(sizeof(regex_t)); + preg = (regex_t *)bmalloc(sizeof(regex_t)); if (current_opts->flags & FO_IGNORECASE) { rc = regcomp(preg, item, REG_EXTENDED|REG_ICASE); } else {