From eb67fb9109a24d866fe81abe4dd221e6fe18416f Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Fri, 7 Aug 2009 21:05:27 -0700 Subject: Fixed memory leaks in upbc. --- src/upb_msg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/upb_msg.c') diff --git a/src/upb_msg.c b/src/upb_msg.c index c58b470..16c24c0 100644 --- a/src/upb_msg.c +++ b/src/upb_msg.c @@ -193,7 +193,7 @@ void *upb_msg_parsenew(struct upb_msgdef *md, struct upb_string *s) * needs to be freed) iff its set bit is set. */ static void free_value(union upb_value_ptr p, struct upb_msg_fielddef *f) { - if(upb_isarray(f)) { + if(upb_isstring(f)) { free((*p.str)->ptr); free(*p.str); } else if(upb_issubmsg(f)) { -- cgit v1.2.3