diff options
Diffstat (limited to 'compat')
-rw-r--r-- | compat/mingw.c | 2 | ||||
-rw-r--r-- | compat/qsort.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compat/mingw.c b/compat/mingw.c index 6ef0cc4f99..8947418ce7 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -1183,7 +1183,7 @@ static int WSAAPI getaddrinfo_stub(const char *node, const char *service, } ai->ai_addrlen = sizeof(struct sockaddr_in); if (hints && (hints->ai_flags & AI_CANONNAME)) - ai->ai_canonname = h ? strdup(h->h_name) : NULL; + ai->ai_canonname = h ? xstrdup(h->h_name) : NULL; else ai->ai_canonname = NULL; diff --git a/compat/qsort.c b/compat/qsort.c index d93dce2cf8..9574d537bd 100644 --- a/compat/qsort.c +++ b/compat/qsort.c @@ -55,7 +55,7 @@ void git_qsort(void *b, size_t n, size_t s, msort_with_tmp(b, n, s, cmp, buf); } else { /* It's somewhat large, so malloc it. */ - char *tmp = malloc(size); + char *tmp = xmalloc(size); msort_with_tmp(b, n, s, cmp, tmp); free(tmp); } |