diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-01-25 10:33:07 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-01-25 10:38:42 -0500 |
commit | e985665d2d226cb42b52bfcad6fd5b1586ad57d7 (patch) | |
tree | e1dbc3753679aa9f677c4e7d49b7bd942e000e48 /src/shared/macro.h | |
parent | 314b4b0a68d9ab35de981923a088fc8c8820caa5 (diff) |
Add _cleanup_pclose_ and fix mismatching pipe close opened by popen()
Based-on-patch-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
cppcheck reported:
[src/bootchart/svg.c:791]: (error) Mismatching allocation and deallocation: f
Diffstat (limited to 'src/shared/macro.h')
-rw-r--r-- | src/shared/macro.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/shared/macro.h b/src/shared/macro.h index 29d91392f8..b307dedaa8 100644 --- a/src/shared/macro.h +++ b/src/shared/macro.h @@ -196,6 +196,7 @@ static inline size_t IOVEC_INCREMENT(struct iovec *i, unsigned n, size_t k) { #define _cleanup_free_ __attribute__((cleanup(freep))) #define _cleanup_fclose_ __attribute__((cleanup(fclosep))) +#define _cleanup_pclose_ __attribute__((cleanup(pclosep))) #define _cleanup_close_ __attribute__((cleanup(closep))) #define _cleanup_closedir_ __attribute__((cleanup(closedirp))) #define _cleanup_umask_ __attribute__((cleanup(umaskp))) |