Merge remote-tracking branch 'rasp/mem-leak' into development

* rasp/mem-leak:
  Fix another potential memory leak found by find-mem-leak.cocci.
  Add a rule for another type of memory leak to find-mem-leak.cocci.
  Fix a potential memory leak found by find-mem-leak.cocci.
  Add a semantic patch to find potential memory leaks.
  Fix whitespace of 369e6c20.
  Apply the semantic patch rm-malloc-cast.cocci.
  Add a semantic patch to remove casts of malloc.

Conflicts:
	programs/ssl/ssl_server2.c
This commit is contained in:
Manuel Pégourié-Gonnard 2015-02-18 10:07:22 +00:00
commit ac08b543db
2 changed files with 26 additions and 1 deletions

View file

@ -0,0 +1,20 @@
@@
expression x, y;
statement S;
@@
x = polarssl_malloc(...);
y = polarssl_malloc(...);
...
* if (x == NULL || y == NULL)
S
@@
expression x, y;
statement S;
@@
if (
* (x = polarssl_malloc(...)) == NULL
||
* (y = polarssl_malloc(...)) == NULL
)
S