package: Avoid memory leak in error case
package: Avoid memory leak in error case

Identified by cppcheck

Change-Id: I9c7f47d8e60233fea6a151ddf72a5a70c1c97284
Reviewed-by: Matt Bennett <e3d8681cec70d3da741935b3385821001b249adc@alliedtelesis.co.nz>
Reviewed-by: Ridge Kennedy <c60c433c4c1ae237d133641099200771ff6f6f30@alliedtelesis.co.nz>
Signed-off-by: Matt Bennett <e3d8681cec70d3da741935b3385821001b249adc@alliedtelesis.co.nz>

ATL-NZ/buildsyspp,alliedtelesis/buildsyspp