From: Marco van Wieringen Date: Tue, 6 Apr 2010 20:29:50 +0000 (+0200) Subject: Fix error introduced when refactoring some of the code. X-Git-Tag: Release-5.0.2~91 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=04730852a0c96baa796ad3f1b52631daaa798977;p=bacula%2Fbacula Fix error introduced when refactoring some of the code. --- diff --git a/bacula/src/cats/myingres.c b/bacula/src/cats/myingres.c index 42a7fbfd26..a52e9356d1 100644 --- a/bacula/src/cats/myingres.c +++ b/bacula/src/cats/myingres.c @@ -60,8 +60,8 @@ short INGgetCols(INGconn *dbconn, const char *query, bool transaction) short number = -1; IISQLDA *sqlda; - sqlda = (IISQLDA *)malloc(IISQDA_HEAD_SIZE + (number * IISQDA_VAR_SIZE)); - memset(sqlda, 0, (IISQDA_HEAD_SIZE + (number * IISQDA_VAR_SIZE))); + sqlda = (IISQLDA *)malloc(IISQDA_HEAD_SIZE + IISQDA_VAR_SIZE); + memset(sqlda, 0, (IISQDA_HEAD_SIZE + IISQDA_VAR_SIZE)); sqlda->sqln = number; stmt = bstrdup(query); /* diff --git a/bacula/src/cats/myingres.sc b/bacula/src/cats/myingres.sc index adebe2e6f0..ad19f91359 100644 --- a/bacula/src/cats/myingres.sc +++ b/bacula/src/cats/myingres.sc @@ -57,8 +57,8 @@ short INGgetCols(INGconn *dbconn, const char *query, bool transaction) short number = -1; IISQLDA *sqlda; - sqlda = (IISQLDA *)malloc(IISQDA_HEAD_SIZE + (number * IISQDA_VAR_SIZE)); - memset(sqlda, 0, (IISQDA_HEAD_SIZE + (number * IISQDA_VAR_SIZE))); + sqlda = (IISQLDA *)malloc(IISQDA_HEAD_SIZE + IISQDA_VAR_SIZE); + memset(sqlda, 0, (IISQDA_HEAD_SIZE + IISQDA_VAR_SIZE)); sqlda->sqln = number;