public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2/lib/format_text export.c
@ 2012-01-25 22:35 zkabelac
0 siblings, 0 replies; 2+ messages in thread
From: zkabelac @ 2012-01-25 22:35 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac@sourceware.org 2012-01-25 22:35:36
Modified files:
lib/format_text: export.c
Log message:
Instrument code that pointer are already released
Set pointers to NULL since on the function exit they are no longer valid.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/export.c.diff?cvsroot=lvm2&r1=1.85&r2=1.86
--- LVM2/lib/format_text/export.c 2012/01/19 15:31:45 1.85
+++ LVM2/lib/format_text/export.c 2012/01/25 22:35:36 1.86
@@ -757,11 +757,15 @@
r = 1;
out:
- if (f->mem)
+ if (f->mem) {
dm_pool_destroy(f->mem);
+ f->mem = NULL;
+ }
- if (f->pv_names)
+ if (f->pv_names) {
dm_hash_destroy(f->pv_names);
+ f->pv_names = NULL;
+ }
return r;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* LVM2/lib/format_text export.c
@ 2011-04-08 14:21 zkabelac
0 siblings, 0 replies; 2+ messages in thread
From: zkabelac @ 2011-04-08 14:21 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac@sourceware.org 2011-04-08 14:21:35
Modified files:
lib/format_text: export.c
Log message:
Add missing printf attributes
These attributes were missing in previous patch, that was adding
instrumentation for printf formating string parameter.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/format_text/export.c.diff?cvsroot=lvm2&r1=1.80&r2=1.81
--- LVM2/lib/format_text/export.c 2010/11/29 12:19:58 1.80
+++ LVM2/lib/format_text/export.c 2011/04/08 14:21:34 1.81
@@ -27,6 +27,7 @@
#include <sys/utsname.h>
struct formatter;
+__attribute__((format(printf, 3, 0)))
typedef int (*out_with_comment_fn) (struct formatter * f, const char *comment,
const char *fmt, va_list ap);
typedef int (*nl_fn) (struct formatter * f);
@@ -147,6 +148,7 @@
}
#define COMMENT_TAB 6
+__attribute__((format(printf, 3, 0)))
static int _out_with_comment_file(struct formatter *f, const char *comment,
const char *fmt, va_list ap)
{
@@ -182,6 +184,7 @@
return 1;
}
+__attribute__((format(printf, 3, 0)))
static int _out_with_comment_raw(struct formatter *f,
const char *comment __attribute__((unused)),
const char *fmt, va_list ap)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-25 22:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-25 22:35 LVM2/lib/format_text export.c zkabelac
-- strict thread matches above, loose matches on Subject: below --
2011-04-08 14:21 zkabelac
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).