linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] obexd/src/main: Fix memory leak on obex server
@ 2014-10-01  6:31 Gowtham Anandha Babu
  2014-10-01  6:58 ` Szymon Janc
  0 siblings, 1 reply; 7+ messages in thread
From: Gowtham Anandha Babu @ 2014-10-01  6:31 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: d.kasatkin, bharat.panda, cpgs, Gowtham Anandha Babu

Freeing the variables at appropriate place.
---
 obexd/src/main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/obexd/src/main.c b/obexd/src/main.c
index 80645f8..7a1ab98 100644
--- a/obexd/src/main.c
+++ b/obexd/src/main.c
@@ -293,8 +293,9 @@ int main(int argc, char *argv[])
 		char *old_root = option_root, *home = getenv("HOME");
 		if (home) {
 			option_root = g_strdup_printf("%s/%s", home, old_root);
-			g_free(old_root);
+			g_free(home);
 		}
+		g_free(old_root);
 	}
 
 	if (option_capability == NULL)
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-10-01 13:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-01  6:31 [PATCH] obexd/src/main: Fix memory leak on obex server Gowtham Anandha Babu
2014-10-01  6:58 ` Szymon Janc
2014-10-01  8:51   ` Gowtham Anandha Babu
2014-10-01  9:00     ` Szymon Janc
2014-10-01 10:54       ` Gowtham Anandha Babu
2014-10-01 13:22         ` Szymon Janc
2014-10-01 13:46           ` Gowtham Anandha Babu

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 NNTP newsgroup(s).