]> Devoid-pointer.net GitWeb - libHPCS.git/commitdiff
Fix memory leak in autodetect_file_type()
authorMichal Malý <madcatxster@devoid-pointer.net>
Sun, 29 Jun 2014 23:20:43 +0000 (01:20 +0200)
committerMichal Malý <madcatxster@devoid-pointer.net>
Sun, 29 Jun 2014 23:20:43 +0000 (01:20 +0200)
libhpcs.c

index 416f8101f23c7a776d302f5e315257fb00605cab..e6f4e27e2f47dc5a79439432f43bcbbef19661b4 100644 (file)
--- a/libhpcs.c
+++ b/libhpcs.c
@@ -178,6 +178,7 @@ static enum HPCS_ParseCode autodetect_file_type(FILE* datafile, enum HPCS_File_T
        else
                *file_type = HPCS_TYPE_UNKNOWN;
 
+       free(type_id);
        return PARSE_OK;
 }