mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
Add zfree
This commit is contained in:
parent
1b263e1f67
commit
9f61a819fc
4 changed files with 27 additions and 15 deletions
|
|
@ -7,4 +7,5 @@ labwc_sources += files(
|
|||
'nodename.c',
|
||||
'spawn.c',
|
||||
'string-helpers.c',
|
||||
'zfree.c',
|
||||
)
|
||||
|
|
|
|||
11
src/common/zfree.c
Normal file
11
src/common/zfree.c
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#include <stdlib.h>
|
||||
#include "common/zfree.h"
|
||||
|
||||
void __zfree(void **ptr)
|
||||
{
|
||||
if (!ptr || !*ptr) {
|
||||
return;
|
||||
}
|
||||
free(*ptr);
|
||||
*ptr = NULL;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue