summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Rühsen <tim.ruehsen@gmx.de>2018-08-30 08:15:03 +0000
committerTim Rühsen <tim.ruehsen@gmx.de>2018-08-30 08:15:03 +0000
commit90a71b2e53e9696bd4c07ff98a12d06ecd2e424d (patch)
treefcb94b808858195f24a71e3e021abdec5253fd41
parent5333d20ce6f14229f6579086b57de0eeacedd4fa (diff)
parent20886264fecba2983b8c4a1b4d3f5c3011f413c5 (diff)
downloadgnutls-90a71b2e53e9696bd4c07ff98a12d06ecd2e424d.tar.gz
Merge branch 'tmp-strdup' into 'master'
Use gnutls_strdup() in library code See merge request gnutls/gnutls!742
-rw-r--r--lib/ext/srp.c4
-rw-r--r--lib/gnutls_int.h6
-rw-r--r--lib/priority.c2
3 files changed, 3 insertions, 9 deletions
diff --git a/lib/ext/srp.c b/lib/ext/srp.c
index 73c7936655..fdbc8e7fb4 100644
--- a/lib/ext/srp.c
+++ b/lib/ext/srp.c
@@ -158,13 +158,13 @@ _gnutls_srp_send_params(gnutls_session_t session,
goto cleanup;
}
- priv->username = strdup(cred->username);
+ priv->username = gnutls_strdup(cred->username);
if (priv->username == NULL) {
gnutls_assert();
goto cleanup;
}
- priv->password = strdup(cred->password);
+ priv->password = gnutls_strdup(cred->password);
if (priv->password == NULL) {
gnutls_assert();
goto cleanup;
diff --git a/lib/gnutls_int.h b/lib/gnutls_int.h
index 8ad6b1652d..f35d6df5f5 100644
--- a/lib/gnutls_int.h
+++ b/lib/gnutls_int.h
@@ -38,12 +38,6 @@
#include <stdbool.h>
#include <assert.h>
-/* For some reason gnulib likes to provide alternatives for
- * functions it doesn't include. Even worse these functions seem
- * to be available on the target systems.
- */
-#undef strdup
-
#ifdef NO_SSIZE_T
#define HAVE_SSIZE_T
typedef int ssize_t;
diff --git a/lib/priority.c b/lib/priority.c
index 00681c53e8..6a93545cdf 100644
--- a/lib/priority.c
+++ b/lib/priority.c
@@ -1154,7 +1154,7 @@ size_t n, n2 = 0, line_size;
ret[n] = 0;
}
} else {
- return strdup(p);
+ return gnutls_strdup(p);
}
finish: