Skip to content

Commit 05cfbfb

Browse files
committed
lib/cb_util: ensure xscd.desc is set
When fmt is NULL, xscd.desc never ends up getting set resulting in it containing whatever was previously in memory. Ensure it gets properly set regardless.
1 parent 1aa8f0c commit 05cfbfb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/cb_util.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ xbps_set_cb_state(struct xbps_handle *xhp,
8282
xscd.state = state;
8383
xscd.err = err;
8484
xscd.arg = arg;
85+
xscd.desc = NULL;
8586
if (fmt != NULL) {
8687
va_start(va, fmt);
8788
retval = vasprintf(&buf, fmt, va);

0 commit comments

Comments
 (0)