Browse Source

convert-dtsv0-lexer.l: fix memory leak

CID 132822 (#1 of 1): Resource leak (RESOURCE_LEAK)
9. leaked_storage: Variable newname going out of scope leaks the storage it points to

Signed-off-by: Jean-Christophe Dubois <jcd@tribudubois.net>
[dwg: Removed unnecessary hunk]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
main
David Gibson 8 years ago
parent
commit
1074ee54b6
  1. 2
      convert-dtsv0-lexer.l

2
convert-dtsv0-lexer.l

@ -223,6 +223,8 @@ static void convert_file(const char *fname) @@ -223,6 +223,8 @@ static void convert_file(const char *fname)

while(yylex())
;

free(newname);
}

int main(int argc, char *argv[])

Loading…
Cancel
Save