Skip to content

Commit fbf95df

Browse files
authored
Update DoubleFree.c
1 parent 7c2100e commit fbf95df

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cpp/ql/src/experimental/Security/CWE/CWE-415/DoubleFree.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
buf = malloc(intSize);
33
...
44
free(buf);
5-
buf = NULL; // GOOD
5+
buf = NULL;
6+
if(buf) free(buf); // GOOD
67
...
78

89
...

0 commit comments

Comments
 (0)