diff --git a/bin/xbps-repo/util.c b/bin/xbps-repo/util.c index f1399f1a..2a8f0bb9 100644 --- a/bin/xbps-repo/util.c +++ b/bin/xbps-repo/util.c @@ -226,7 +226,7 @@ show_pkg_namedesc(prop_object_t obj, void *arg, bool *loop_done) (xbps_pkgpattern_match(desc, rsd->pattern) == 1) || (strcmp(pkgname, rsd->pattern) == 0) || (strstr(pkgver, rsd->pattern)) || (strstr(desc, rsd->pattern))) { - tmp = malloc(rsd->pkgver_len + 1); + tmp = calloc(1, rsd->pkgver_len + 1); if (tmp == NULL) return errno;