]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Use gnutls_strdup() instead of strdup() in library code
authorTim Rühsen <tim.ruehsen@gmx.de>
Fri, 24 Aug 2018 14:34:14 +0000 (16:34 +0200)
committerTim Rühsen <tim.ruehsen@gmx.de>
Fri, 24 Aug 2018 14:34:14 +0000 (16:34 +0200)
Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
lib/ext/srp.c
lib/priority.c

index 73c7936655b6b4f8ea83b1c6c1e47df6524ed2bf..fdbc8e7fb4117ad7498d25ae0a8b09e8b20c7013 100644 (file)
@@ -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;
index 00681c53e81c5e7839e4ce1d501328dc099ccd42..6a93545cdfddbdca46d6a9548e303a5bf0e8ea11 100644 (file)
@@ -1154,7 +1154,7 @@ size_t n, n2 = 0, line_size;
                        ret[n] = 0;
                }
        } else {
-               return strdup(p);
+               return gnutls_strdup(p);
        }
 
 finish: