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

Commit 09044a4a authored by Navid Emamdoost's avatar Navid Emamdoost Committed by Greg Kroah-Hartman
Browse files

iwlwifi: dbg_ini: fix memory leak in alloc_sgtable



commit b4b814fec1a5a849383f7b3886b654a13abbda7d upstream.

In alloc_sgtable if alloc_page fails, the alocated table should be
released.

Signed-off-by: default avatarNavid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
Signed-off-by: default avatarBen Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0648766c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -547,6 +547,7 @@ static struct scatterlist *alloc_sgtable(int size)
				if (new_page)
					__free_page(new_page);
			}
			kfree(table);
			return NULL;
		}
		alloc_size = min_t(int, size, PAGE_SIZE);