summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2018-09-20 14:29:52 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2018-09-20 14:29:52 +0000
commitc0211809de5fa660ced0a4391d2af2897a4cf148 (patch)
tree7ea26f9ba5d8dc30422b592b94f817a24d04a9ed
parent8ee1fb73c8284bfd2105d7258d217d1f6fbb3696 (diff)
parent9b53438bce4b9b758895f68d5b77235a5e6e37d9 (diff)
downloadgnutls-c0211809de5fa660ced0a4391d2af2897a4cf148.tar.gz
Merge branch 'tmp-res-prio' into 'master'
Fix issue introduced in 20886264fe See merge request gnutls/gnutls!756
-rw-r--r--lib/priority.c6
-rw-r--r--tests/system-prio-file.c3
2 files changed, 4 insertions, 5 deletions
diff --git a/lib/priority.c b/lib/priority.c
index 1991635d86..6a4ccc2f46 100644
--- a/lib/priority.c
+++ b/lib/priority.c
@@ -1056,7 +1056,7 @@ void _gnutls_unload_system_priorities(void)
* priorities, appended with any additional present in
* the priorities string.
*
- * The returned string must be released using free().
+ * The returned string must be released using gnutls_free().
*/
char *_gnutls_resolve_priorities(const char* priorities)
{
@@ -1140,7 +1140,7 @@ size_t n, n2 = 0, line_size;
if (additional)
n2 = strlen(additional);
- ret = malloc(n+n2+1+1);
+ ret = gnutls_malloc(n+n2+1+1);
if (ret == NULL) {
goto finish;
}
@@ -1859,7 +1859,7 @@ gnutls_priority_init(gnutls_priority_t * priority_cache,
goto error_cleanup;
}
- free(darg);
+ gnutls_free(darg);
return 0;
diff --git a/tests/system-prio-file.c b/tests/system-prio-file.c
index e0dfa9460c..4368bd0018 100644
--- a/tests/system-prio-file.c
+++ b/tests/system-prio-file.c
@@ -57,7 +57,7 @@ try_prio(const char *prio, const char *expected_str)
}
ok:
- free(p);
+ gnutls_free(p);
gnutls_global_deinit();
}
@@ -84,4 +84,3 @@ void doit(void)
try_prio("@HELLONO:+AES-128-CBC", NULL);
try_prio("@HELLONO,:+AES-128-CBC", NULL);
}
-