Browse code

regfree() function call is added to free the memory allocated by regcomp().

Miklos Tirpak authored on 03/03/2009 12:46:40
Showing 1 changed files
... ...
@@ -991,6 +991,7 @@ void free_avp_ident(avp_ident_t* attr)
991 991
 			abort();
992 992
 #endif
993 993
 		} else {
994
+			regfree(attr->name.re);
994 995
 			pkg_free(attr->name.re);
995 996
 		}
996 997
 	}
... ...
@@ -1019,8 +1020,10 @@ int parse_avp_spec( str *name, int *type, int_str *avp_name, int *index)
1019 1020
 
1020 1021
 void free_avp_name( int *type, int_str *avp_name)
1021 1022
 {
1022
-	if ((*type & AVP_NAME_RE) && (avp_name->re))
1023
+	if ((*type & AVP_NAME_RE) && (avp_name->re)) {
1024
+		regfree(avp_name->re);
1023 1025
 		pkg_free(avp_name->re);
1026
+	}
1024 1027
 }
1025 1028
 
1026 1029
 int add_avp_galias_str(char *alias_definition)