Search Linux Wireless

[PATCH 12/40] crda: explicitly munmap() on reglib_get_rd_alpha2()

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

 



From: "Luis R. Rodriguez" <mcgrof@xxxxxxxxxxxxxxxx>

Although the region mapped by mmap() is also automatically
unmapped when the process is terminated lets just munmap()
it ourselves to be more tidy.

Signed-off-by: Luis R. Rodriguez <mcgrof@xxxxxxxxxxxxxxxx>
---
 reglib.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/reglib.c b/reglib.c
index 867e8cf..bb6f23f 100644
--- a/reglib.c
+++ b/reglib.c
@@ -357,6 +357,7 @@ reglib_get_rd_alpha2(const char *alpha2, const char *file)
 
 out:
 	close(fd);
+	munmap(db, dblen);
 	return rd;
 }
 
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux