From: Sebastian Harl Date: Fri, 17 Oct 2014 06:30:16 +0000 (+0200) Subject: data: Don't free memory before using it for the last time. X-Git-Tag: sysdb-0.6.0~114 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4319a6c4307bedea5f1ee993ca1b1208a4d4310d;p=sysdb.git data: Don't free memory before using it for the last time. --- diff --git a/src/core/data.c b/src/core/data.c index a796b21..557dfd6 100644 --- a/src/core/data.c +++ b/src/core/data.c @@ -602,9 +602,9 @@ sdb_data_parse(char *str, int type, sdb_data_t *data) return -1; if (regcomp(&tmp.data.re.regex, tmp.data.re.raw, REG_EXTENDED | REG_ICASE | REG_NOSUB)) { - free(tmp.data.re.raw); sdb_log(SDB_LOG_ERR, "core: Failed to compile regular " "expression '%s'", tmp.data.re.raw); + free(tmp.data.re.raw); return -1; } if (! data) {