[brasero] Fix memleak on error



commit fde087f11fa09fe380ee1d15bae7fbad7577237a
Author: Philippe Rouquier <bonfire-app wanadoo fr>
Date:   Mon Jul 20 15:15:19 2009 +0200

    Fix memleak on error

 libbrasero-media/scsi-get-configuration.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libbrasero-media/scsi-get-configuration.c b/libbrasero-media/scsi-get-configuration.c
index 958b42b..f562d41 100644
--- a/libbrasero-media/scsi-get-configuration.c
+++ b/libbrasero-media/scsi-get-configuration.c
@@ -218,11 +218,11 @@ brasero_mmc2_get_profile (BraseroDeviceHandle *handle,
 	memset (&hdr, 0, sizeof (hdr));
 	BRASERO_SET_16 (cdb->alloc_len, sizeof (hdr));
 	res = brasero_scsi_command_issue_sync (cdb, &hdr, sizeof (hdr), error);
+	brasero_scsi_command_free (cdb);
+
 	if (res)
 		return res;
 
-	brasero_scsi_command_free (cdb);
-
 	*profile = BRASERO_GET_16 (hdr.current_profile);
 	return BRASERO_SCSI_OK;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]