Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f7ace5f0 authored by Dan Carpenter's avatar Dan Carpenter Committed by John W. Linville
Browse files

wlcore: fix a couple small memory leaks



We should free "chunk" here before returning the error code.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
parent 0344dcd3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -192,7 +192,7 @@ static int wl1271_boot_upload_firmware_chunk(struct wl1271 *wl, void *buf,
	partition.mem.start = dest;
	ret = wlcore_set_partition(wl, &partition);
	if (ret < 0)
		return ret;
		goto out;

	/* 10.1 set partition limit and chunk num */
	chunk_num = 0;
@@ -208,7 +208,7 @@ static int wl1271_boot_upload_firmware_chunk(struct wl1271 *wl, void *buf,
			partition.mem.start = addr;
			ret = wlcore_set_partition(wl, &partition);
			if (ret < 0)
				return ret;
				goto out;
		}

		/* 10.3 upload the chunk */