summaryrefslogtreecommitdiff
path: root/gweb
diff options
context:
space:
mode:
authorDaniel Wagner <daniel.wagner@bmw-carit.de>2011-03-17 13:25:35 (GMT)
committerSamuel Ortiz <sameo@linux.intel.com>2011-03-17 16:48:15 (GMT)
commit26a9401f56669417f2a4bc73e2401272f56faafb (patch)
tree020982d4cef59abf2902d2c727bb8b11cd2ad34e /gweb
parent849f635ba989be5aa40a9c12ab72d4a72558e492 (diff)
downloadconnman-26a9401f56669417f2a4bc73e2401272f56faafb.zip
connman-26a9401f56669417f2a4bc73e2401272f56faafb.tar.gz
connman-26a9401f56669417f2a4bc73e2401272f56faafb.tar.bz2
gresolv: Fix memory leak
Reported by: DJ Cozatt <ygdrasil@comcast.net>
Diffstat (limited to 'gweb')
-rw-r--r--gweb/gresolv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gweb/gresolv.c b/gweb/gresolv.c
index 938aa69..632f0c3 100644
--- a/gweb/gresolv.c
+++ b/gweb/gresolv.c
@@ -908,8 +908,10 @@ static gint add_query(struct resolv_lookup *lookup, const char *hostname, int ty
query->msgid = buf[0] << 8 | buf[1];
- if (send_query(lookup->resolv, buf, len) < 0)
+ if (send_query(lookup->resolv, buf, len) < 0) {
+ g_free(query);
return -EIO;
+ }
query->resolv = lookup->resolv;
query->lookup = lookup;