diff options
| author | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2007-01-23 20:34:55 +0000 | 
|---|---|---|
| committer | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2007-01-23 20:34:55 +0000 | 
| commit | 5f80c518582acd9045c952b73bc0f25f97628b37 (patch) | |
| tree | 7f786f9c80226056792bdbb1233f2597d0f9e4b6 /input/input-service.c | |
| parent | 7f496bf581e831e8b256ce9b0447a13a882fdad3 (diff) | |
Removed GIOChannel memory leak
Diffstat (limited to 'input/input-service.c')
| -rw-r--r-- | input/input-service.c | 6 | 
1 files changed, 6 insertions, 0 deletions
| diff --git a/input/input-service.c b/input/input-service.c index cffb4cb3..5a891709 100644 --- a/input/input-service.c +++ b/input/input-service.c @@ -564,6 +564,7 @@ static gboolean interrupt_connect_cb(GIOChannel *chan, GIOCondition cond,  			dbus_message_new_method_return(pc->msg));  	pending_connect_free(pc); +	g_io_channel_unref(chan);  	return FALSE;  failed: @@ -573,6 +574,7 @@ failed:  	idev->hidp.intr_sock = -1;  	err_connection_failed(pc->conn, pc->msg, strerror(err));  	pending_connect_free(pc); +	g_io_channel_unref(chan);  	return FALSE;  } @@ -619,6 +621,7 @@ static gboolean control_connect_cb(GIOChannel *chan, GIOCondition cond,  		goto failed;  	} +	g_io_channel_unref(chan);  	return FALSE;  failed: @@ -628,6 +631,7 @@ failed:  	idev->hidp.ctrl_sock = -1;  	err_connection_failed(pc->conn, pc->msg, strerror(err));  	pending_connect_free(pc); +	g_io_channel_unref(chan);  	return FALSE;  } @@ -1183,6 +1187,7 @@ static DBusHandlerResult manager_create_device(DBusConnection *conn,  		error("Bluetooth device not available");  		return err_failed(conn, msg, "Bluetooth adapter not available");  	} +	memset(&di, 0, sizeof(struct hci_dev_info));  	if (hci_devinfo(dev_id, &di) < 0) {  		error("Can't get local adapter device info");  		return err_failed(conn, msg, "Bluetooth adapter not available"); @@ -1366,6 +1371,7 @@ static int register_stored_inputs(DBusConnection *conn)  		error("Bluetooth device not available");  		return -1;  	} +	memset(&di, 0, sizeof(struct hci_dev_info));  	if (hci_devinfo(dev_id, &di) < 0) {  		error("Can't get local adapter device info");  		return -1; | 
