[vino] Be more careful with memory allocation
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vino] Be more careful with memory allocation
- Date: Mon, 27 May 2013 02:37:11 +0000 (UTC)
commit 81b5e3780f69e7a3c465afbe6cae9712d47c7deb
Author: Matthias Clasen <mclasen redhat com>
Date: Sat May 25 00:52:07 2013 -0400
Be more careful with memory allocation
Better to 0-initialize these structs, since GetValidIGD may
not end up filling them.
See https://bugzilla.redhat.com/attachment.cgi?id=707491
for a related stacktrace.
https://bugzilla.gnome.org/show_bug.cgi?id=700987
server/vino-upnp.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/server/vino-upnp.c b/server/vino-upnp.c
index fcccfc7..99d7a71 100644
--- a/server/vino-upnp.c
+++ b/server/vino-upnp.c
@@ -91,8 +91,8 @@ update_upnp_status (VinoUpnp *upnp)
dprintf (UPNP, "found.\n");
dprintf (UPNP, "UPnP: Looking for a valid IGD... ");
- upnp->priv->urls = g_new (struct UPNPUrls, 1);
- upnp->priv->data = g_new (struct IGDdatas, 1);
+ upnp->priv->urls = g_new0 (struct UPNPUrls, 1);
+ upnp->priv->data = g_new0 (struct IGDdatas, 1);
res = UPNP_GetValidIGD (devlist,
upnp->priv->urls,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]