From: Karel Zak Date: Wed, 17 Apr 2024 10:43:30 +0000 (+0200) Subject: hardlink: use xcalloc rather than xmalloc X-Git-Tag: v2.42-start~395^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f94aa460eafdfc096afe0dd4a490094006d6b238;p=thirdparty%2Futil-linux.git hardlink: use xcalloc rather than xmalloc Signed-off-by: Karel Zak --- diff --git a/misc-utils/hardlink.c b/misc-utils/hardlink.c index 89046a9f7..563166242 100644 --- a/misc-utils/hardlink.c +++ b/misc-utils/hardlink.c @@ -508,7 +508,7 @@ static int cmp_xattr_name_ptrs(const void *ptr1, const void *ptr2) */ static const char **get_sorted_xattr_name_table(const char *names, int n) { - const char **table = xmalloc(n * sizeof(char *)); + const char **table = xcalloc(n, sizeof(char *)); int i; for (i = 0; i < n; i++) {