xbps_transaction_prepare: initialize trans dict!

... otherwise it will always return ENXIO
This commit is contained in:
Juan RP
2019-06-21 17:13:06 +02:00
parent 1ceefe6f53
commit 2f1fd70a4e

View File

@ -279,6 +279,9 @@ xbps_transaction_prepare(struct xbps_handle *xhp)
unsigned int i, cnt;
int rv = 0;
if ((rv = xbps_transaction_init(xhp)) != 0)
return rv;
if (xhp->transd == NULL)
return ENXIO;