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
No known key found for this signature in database
GPG Key ID: AF19F6CB482F9368

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;