]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Tweak malloc/bmalloc call in filed/job.c
authorEric Bollengier <eric@baculasystems.com>
Mon, 7 Feb 2022 18:05:25 +0000 (19:05 +0100)
committerEric Bollengier <eric@baculasystems.com>
Thu, 24 Mar 2022 08:03:04 +0000 (09:03 +0100)
bacula/src/filed/job.c

index 09713d29ab0dd3162cfd9971fd6370a2dd9e1e2b..7023f610497720ece0657962ad7594bf0a963df3 100644 (file)
@@ -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 {