From 39fcdffcfa9581fd2597339876b4d02f0b4ac962 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Wi=C5=9Bniewski?= <82811246+h3xOo@users.noreply.github.com> Date: Sun, 3 Sep 2023 21:44:11 +0200 Subject: [PATCH] Fix memory leak in xstrdup --- st.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/st.c b/st.c index 0f4593e..2f9d3c2 100644 --- a/st.c +++ b/st.c @@ -280,8 +280,6 @@ xrealloc(void *p, size_t len) char * xstrdup(const char *s) { - if ((s = strdup(s)) == NULL) - die("strdup: %s\n", strerror(errno)); char *p; if ((p = strdup(s)) == NULL)