libfprint/libfprint/nbis/glib-memory.cocci

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
427 B
Plaintext
Raw Normal View History

@ free @
expression ptr;
@@
- free(ptr);
+ g_free(ptr);
@ malloc @
type ptr_type;
expression ptr;
expression size;
@@
- ptr = (ptr_type) malloc(size);
+ ptr = (ptr_type) g_malloc(size);
...
(
- if (ptr == (ptr_type) NULL) { ... }
|
)
@ realloc @
type ptr_type;
expression ptr;
expression size;
@@
- ptr = (ptr_type) realloc(ptr, size);
+ ptr = (ptr_type) g_realloc(ptr, size);
...
(
- if (ptr == (ptr_type) NULL) { ... }
|
)