[Pkg-libvirt-commits] [libguestfs] 28/36: daemon: add CLEANUP_FREE_STRINGSBUF

Hilko Bengen bengen at moszumanska.debian.org
Sun Nov 1 17:13:44 UTC 2015


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag upstream/1.29.47
in repository libguestfs.

commit fd6a66fde485f4445a947c218fdd00bc3bd68034
Author: Pino Toscano <ptoscano at redhat.com>
Date:   Wed Jun 17 12:25:32 2015 +0200

    daemon: add CLEANUP_FREE_STRINGSBUF
---
 daemon/daemon.h   | 3 +++
 daemon/guestfsd.c | 6 ++++++
 2 files changed, 9 insertions(+)

diff --git a/daemon/daemon.h b/daemon/daemon.h
index bed4dbc..d3ba148 100644
--- a/daemon/daemon.h
+++ b/daemon/daemon.h
@@ -178,6 +178,7 @@ extern void cleanup_free_string_list (void *ptr);
 extern void cleanup_unlink_free (void *ptr);
 extern void cleanup_close (void *ptr);
 extern void cleanup_aug_close (void *ptr);
+extern void cleanup_free_stringsbuf (void *ptr);
 
 /*-- in names.c (auto-generated) --*/
 extern const char *function_names[];
@@ -458,12 +459,14 @@ is_zero (const char *buffer, size_t size)
 #define CLEANUP_UNLINK_FREE __attribute__((cleanup(cleanup_unlink_free)))
 #define CLEANUP_CLOSE __attribute__((cleanup(cleanup_close)))
 #define CLEANUP_AUG_CLOSE __attribute__((cleanup(cleanup_aug_close)))
+#define CLEANUP_FREE_STRINGSBUF __attribute__((cleanup(cleanup_free_stringsbuf)))
 #else
 #define CLEANUP_FREE
 #define CLEANUP_FREE_STRING_LIST
 #define CLEANUP_UNLINK_FREE
 #define CLEANUP_CLOSE
 #define CLEANUP_AUG_CLOSE
+#define CLEANUP_FREE_STRINGSBUF
 #endif
 
 #endif /* GUESTFSD_DAEMON_H */
diff --git a/daemon/guestfsd.c b/daemon/guestfsd.c
index 453dee1..a571aad 100644
--- a/daemon/guestfsd.c
+++ b/daemon/guestfsd.c
@@ -1539,3 +1539,9 @@ cleanup_aug_close (void *ptr)
   if (aug != NULL)
     aug_close (aug);
 }
+
+void
+cleanup_free_stringsbuf (void *ptr)
+{
+  free_stringsbuf ((struct stringsbuf *) ptr);
+}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list