Fix memory leak

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
This commit is contained in:
Miika Turkia 2017-05-04 21:22:41 +03:00 committed by Dirk Hohndel
parent 0d36b6e4e8
commit 52426b8585

View file

@ -60,7 +60,7 @@ int TestParse::parseCSV(int units, std::string file)
char *params[55]; char *params[55];
int pnr = 0; int pnr = 0;
params[pnr++] = strdup(strdup("numberField")); params[pnr++] = strdup("numberField");
params[pnr++] = intdup(0); params[pnr++] = intdup(0);
params[pnr++] = strdup("dateField"); params[pnr++] = strdup("dateField");
params[pnr++] = intdup(1); params[pnr++] = intdup(1);
@ -411,7 +411,7 @@ int TestParse::parseCSVmanual(int units, std::string file)
char *params[55]; char *params[55];
int pnr = 0; int pnr = 0;
params[pnr++] = strdup(strdup("numberField")); params[pnr++] = strdup("numberField");
params[pnr++] = intdup(0); params[pnr++] = intdup(0);
params[pnr++] = strdup("dateField"); params[pnr++] = strdup("dateField");
params[pnr++] = intdup(1); params[pnr++] = intdup(1);