From: Bert Vermeulen Date: Sun, 9 Dec 2012 13:40:12 +0000 (+0100) Subject: victor-dmm: free in the right order X-Git-Tag: dsupstream~456 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=9ec7ff94ed08aecc9c8898b00c797fd2621438c4;p=libsigrok.git victor-dmm: free in the right order --- diff --git a/hardware/victor-dmm/api.c b/hardware/victor-dmm/api.c index 46e8c1d5..ae0d2a76 100644 --- a/hardware/victor-dmm/api.c +++ b/hardware/victor-dmm/api.c @@ -340,15 +340,15 @@ static void receive_transfer(struct libusb_transfer *transfer) if ((ret = libusb_submit_transfer(transfer) != 0)) { sr_err("Unable to resubmit transfer: %s.", libusb_error_name(ret)); - libusb_free_transfer(transfer); g_free(transfer->buffer); + libusb_free_transfer(transfer); hw_dev_acquisition_stop(sdi, sdi); } } else { /* This was the last transfer we're going to receive, so * clean up now. */ - libusb_free_transfer(transfer); g_free(transfer->buffer); + libusb_free_transfer(transfer); } }