Skip to content

Commit f8f31a1

Browse files
committed
lib: replace assert with error check in xbps_conf_init
1 parent ac215fd commit f8f31a1

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/conf.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,8 +495,10 @@ xbps_conf_init(struct xbps_handle *xhp)
495495
int r = 0;
496496

497497
assert(xhp);
498+
498499
seen = xbps_dictionary_create();
499-
assert(seen);
500+
if (!seen)
501+
return xbps_error_oom();
500502

501503
if (xhp->confdir[0]) {
502504
xbps_dbg_printf("Processing configuration directory: %s\n", xhp->confdir);

0 commit comments

Comments
 (0)