Dwarves Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] Use obstack_zalloc when allocating tag
@ 2014-06-18  9:55 Masatake YAMATO
  0 siblings, 0 replies; only message in thread
From: Masatake YAMATO @ 2014-06-18  9:55 UTC (permalink / raw)
  To: dwarves-u79uwXL29TY76Z2rM5mHXA; +Cc: yamato-H+wXaHxf7aLQT0dZR+AlfA

obstack_alloc was used in __tag__alloc to allocate tag
object. As the result some fields of the tag object are not

Signed-off-by: Masatake YAMATO <yamato-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
 dwarf_loader.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dwarf_loader.c b/dwarf_loader.c
index d7709a0..bc04b62 100644
--- a/dwarf_loader.c
+++ b/dwarf_loader.c
@@ -369,7 +369,7 @@ static void *__tag__alloc(struct dwarf_cu *dcu, size_t size, bool spec)
 	if (dtag == NULL)
 		return NULL;
-	struct tag *tag = obstack_alloc(&dcu->cu->obstack, size);
+	struct tag *tag = obstack_zalloc(&dcu->cu->obstack, size);
 	if (tag == NULL)
 		return NULL;

To unsubscribe from this list: send the line "unsubscribe dwarves" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-18  9:55 [PATCH] Use obstack_zalloc when allocating tag Masatake YAMATO

Dwarves Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dwarves/0 dwarves/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dwarves dwarves/ https://lore.kernel.org/dwarves \
	public-inbox-index dwarves

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git