From 4319a6c4307bedea5f1ee993ca1b1208a4d4310d Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Fri, 17 Oct 2014 08:30:16 +0200 Subject: [PATCH] data: Don't free memory before using it for the last time. --- src/core/data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.30.2