PUD: posFile: fix leaking regexComment on error path
authorFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 6 Jun 2012 14:58:17 +0000 (16:58 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 7 Jun 2012 22:30:05 +0000 (00:30 +0200)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/pud/src/posFile.c

index 7f95243..02f9e36 100644 (file)
@@ -58,6 +58,7 @@ bool startPositionFile(void) {
 
        if (regcomp(&regexNameValue, regexNameValueString, REG_EXTENDED)) {
                pudError(false, "Could not compile regex \"%s\"", regexNameValueString);
+               regfree(&regexComment);
                return false;
        }