X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=src%2Fos_regex%2Fos_match_free_pattern.c;h=9ed4ca4af7dbeb5aa46a2b727ef25e146c25bfe2;hb=927951d1c1ad45ba9e7325f07d996154a91c911b;hp=095f8c93d5c83c09740bf6e05a3248159741d662;hpb=914feba5d54f979cd5d7e69c349c3d01f630042a;p=ossec-hids.git diff --git a/src/os_regex/os_match_free_pattern.c b/src/os_regex/os_match_free_pattern.c index 095f8c9..9ed4ca4 100755 --- a/src/os_regex/os_match_free_pattern.c +++ b/src/os_regex/os_match_free_pattern.c @@ -5,7 +5,7 @@ * * This program is a free software; you can redistribute it * and/or modify it under the terms of the GNU General Public - * License (version 3) as published by the FSF - Free Software + * License (version 2) as published by the FSF - Free Software * Foundation */ @@ -33,18 +33,19 @@ void OSMatch_FreePattern(OSMatch *reg) { if(*pattern) free(*pattern); - pattern++; + pattern++; } free(reg->patterns); - free(reg->size); - free(reg->match_fp); - reg->patterns = NULL; - reg->size = NULL; - reg->match_fp = NULL; } + free(reg->size); + free(reg->match_fp); + + reg->size = NULL; + reg->match_fp = NULL; + return; }