mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-31 22:25:33 -04:00
core-util: implement pa_xstrfreev()
This commit is contained in:
parent
7de7b012fd
commit
c5dbf754b5
2 changed files with 18 additions and 0 deletions
|
|
@ -2732,3 +2732,15 @@ void pa_disable_sigpipe(void) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void pa_xfreev(void**a) {
|
||||||
|
void **p;
|
||||||
|
|
||||||
|
if (!a)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (p = a; *p; p++)
|
||||||
|
pa_xfree(*p);
|
||||||
|
|
||||||
|
pa_xfree(a);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -229,4 +229,10 @@ char *pa_realpath(const char *path);
|
||||||
|
|
||||||
void pa_disable_sigpipe(void);
|
void pa_disable_sigpipe(void);
|
||||||
|
|
||||||
|
void pa_xfreev(void**a);
|
||||||
|
|
||||||
|
static inline void pa_xstrfreev(char **a) {
|
||||||
|
pa_xfreev((void**) a);
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue