1 /* $OSSEC, os_regex_free_substrings.c, v0.1, 2006/01/02, Daniel B. Cid$ */
3 /* Copyright (C) 2009 Trend Micro Inc.
6 * This program is a free software; you can redistribute it
7 * and/or modify it under the terms of the GNU General Public
8 * License (version 2) as published by the FSF - Free Software
18 #include "os_regex_internal.h"
21 /** int OSRegex_FreeSubStrings(OSRegex *reg) v0.1
22 * Release all the memory created to store the sub strings.
25 void OSRegex_FreeSubStrings(OSRegex *reg)
29 /* Freeing the sub strings */
32 while(reg->sub_strings[i])
34 free(reg->sub_strings[i]);
35 reg->sub_strings[i] = NULL;