opkg_cmd: fix segmentation fault in opkg_compare_versions_cmd()
authorJo-Philipp Wich <jo@mein.io>
Wed, 15 Mar 2017 02:08:18 +0000 (03:08 +0100)
committerJo-Philipp Wich <jo@mein.io>
Wed, 15 Mar 2017 02:08:18 +0000 (03:08 +0100)
commit45b54f61deac61413cfb38c43e040deb0ef89670
tree246bcedea2971b9abe217f6736b261999b11dd20
parent93de62b22b0fc13ccc47b41fb251a1ca575892cb
opkg_cmd: fix segmentation fault in opkg_compare_versions_cmd()

Due to the fact that we're using blob buffers internally now we cannot simpyl
call parse_version() on an uninitialized struct.

Properly create the temporary packages using pkg_new() and deallocated them
using pkg_deinit() and free().

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
libopkg/opkg_cmd.c