When ever we install any package that package is first downloaded into cache then it is installed. When the package is downloaded there is a leakage of number of bytes equal to size of file path. If the package is already in cache then there is no leakage. I checked the leakage using valgrind.
*** Bug 8518 has been marked as a duplicate of this bug. ***
*** Bug 8519 has been marked as a duplicate of this bug. ***
Indeed, opkg_download_pkg is leaking if a package is not on the cache: ==2528== 123 bytes in 1 blocks are definitely lost in loss record 3 of 6 ==2528== at 0x4C28F30: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==2528== by 0x4C2B2DF: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==2528== by 0x4E51248: xrealloc (xfuncs.c:45) ==2528== by 0x4E50FB6: sprintf_alloc (sprintf_alloc.c:51) ==2528== by 0x4E403E7: get_cache_location (opkg_download.c:145) ==2528== by 0x4E4058B: opkg_download_pkg (opkg_download.c:264) ==2528== by 0x4E41C57: opkg_install_pkg (opkg_install.c:1419) ==2528== by 0x4E427E3: opkg_install_by_name (opkg_install.c:1299) ==2528== by 0x4E3FD3F: opkg_install_cmd (opkg_cmd.c:423) ==2528== by 0x401583: main (opkg.c:406)
Fixed on 7c3fc63f2393aa8960b60be87fbd6f5e799693e4