[gssdp] sniffer: Plug memory leak when looking for hosts
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gssdp] sniffer: Plug memory leak when looking for hosts
- Date: Wed, 31 Oct 2018 15:21:37 +0000 (UTC)
commit ea9428b18052a7f8f965e417a11a86ccba9db2b3
Author: Jens Georg <mail jensge org>
Date: Wed Oct 31 16:20:45 2018 +0100
sniffer: Plug memory leak when looking for hosts
tools/gssdp-device-sniffer.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/tools/gssdp-device-sniffer.c b/tools/gssdp-device-sniffer.c
index 7b71ec0..626117f 100644
--- a/tools/gssdp-device-sniffer.c
+++ b/tools/gssdp-device-sniffer.c
@@ -283,12 +283,11 @@ find_device (GtkTreeModel *model, const char *uuid, GtkTreeIter *iter)
gtk_tree_model_get (model,
iter,
0, &device_uuid, -1);
- if (device_uuid && strcmp (device_uuid, uuid) == 0) {
- found = TRUE;
- break;
- }
-
+ found = g_strcmp0 (device_uuid, uuid) == 0;
g_free (device_uuid);
+
+ if (found)
+ break;
more = gtk_tree_model_iter_next (model, iter);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]