2005-09-04 Dan Williams <dcbw@redhat.com>

* src/nm-activation-request.c
		- (nm_act_request_unref): actually free the structure,
			which we didn't seem to be doing before


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@934 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams
2005-09-04 17:00:17 +00:00
parent 837c65d445
commit 2bc60a447d
2 changed files with 9 additions and 3 deletions

View File

@@ -1,3 +1,9 @@
2005-09-04 Dan Williams <dcbw@redhat.com>
* src/nm-activation-request.c
- (nm_act_request_unref): actually free the structure,
which we didn't seem to be doing before
2005-09-04 Dan Williams <dcbw@redhat.com> 2005-09-04 Dan Williams <dcbw@redhat.com>
Patch from John Palmieri <johnp@redhat.com> Patch from John Palmieri <johnp@redhat.com>

View File

@@ -87,7 +87,8 @@ void nm_act_request_unref (NMActRequest *req)
{ {
g_return_if_fail (req != NULL); g_return_if_fail (req != NULL);
if (req->refcount == 1) req->refcount--;
if (req->refcount <= 0)
{ {
nm_device_unref (req->dev); nm_device_unref (req->dev);
if (req->ap) if (req->ap)
@@ -100,9 +101,8 @@ void nm_act_request_unref (NMActRequest *req)
} }
memset (req, 0, sizeof (NMActRequest)); memset (req, 0, sizeof (NMActRequest));
g_free (req);
} }
else
req->refcount--;
} }
NMDevice * nm_act_request_get_dev (NMActRequest *req) NMDevice * nm_act_request_get_dev (NMActRequest *req)