[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnurl] 119/256: http: fix a memory leakage in checkrtsppre
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnurl] 119/256: http: fix a memory leakage in checkrtspprefix(). |
Date: |
Fri, 06 Oct 2017 19:43:30 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 3b51fa6285303cb5b01c4bd5be1a544a877475e6
Author: Patrick Monnerat <address@hidden>
AuthorDate: Sat Sep 2 12:40:19 2017 +0100
http: fix a memory leakage in checkrtspprefix().
---
lib/http.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/lib/http.c b/lib/http.c
index 3e3313278..cf50a7cac 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -2809,6 +2809,7 @@ static bool
checkrtspprefix(struct Curl_easy *data,
const char *s)
{
+ bool result = FALSE;
#ifdef CURL_DOES_CONVERSIONS
/* convert from the network encoding using a scratch area */
@@ -2819,16 +2820,17 @@ checkrtspprefix(struct Curl_easy *data,
}
if(CURLE_OK != Curl_convert_from_network(data, scratch, strlen(s)+1)) {
/* Curl_convert_from_network calls failf if unsuccessful */
- free(scratch);
- return FALSE; /* can't return CURLE_foobar so return FALSE */
+ result = FALSE; /* can't return CURLE_foobar so return FALSE */
}
- s = scratch;
+ else
+ result = checkprefix("RTSP/", scratch)? TRUE: FALSE;
+ free(scratch);
#else
(void)data; /* unused */
+ result = checkprefix("RTSP/", s)? TRUE: FALSE;
#endif /* CURL_DOES_CONVERSIONS */
- if(checkprefix("RTSP/", s))
- return TRUE;
- return FALSE;
+
+ return result;
}
#endif /* CURL_DISABLE_RTSP */
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnurl] 67/256: vtls: use the Curl_ssl struct to access all SSL backends' functionality, (continued)
- [GNUnet-SVN] [gnurl] 67/256: vtls: use the Curl_ssl struct to access all SSL backends' functionality, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 20/256: ssh: add the ability to enable compression (for SCP/SFTP), gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 79/256: urldata.h: move SSPI-specific #include to correct location, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 60/256: strtooff: fix build for systems with long long but no strtoll option, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 98/256: curl_global_init.3: mention curl_global_sslset(3), gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 101/256: HELP-US.md: spelling, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 64/256: vtls: make sure every _sha256sum()'s first arg is const, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 139/256: RELEASE-NOTES: fixed the function counter script, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 117/256: curl_global_sslset: select backend by name case insensitively, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 110/256: cyassl: call it the "WolfSSL" backend, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 119/256: http: fix a memory leakage in checkrtspprefix().,
gnunet <=
- [GNUnet-SVN] [gnurl] 112/256: curl_global_sslset.3: show the struct and enum too, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 123/256: runtests.pl: allow <file[1-4]> tags in client section., gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 95/256: asyn-thread: Set errno to the proper value ENOMEM in OOM situation, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 114/256: strcase: corrected comment header for Curl_strcasecompare(), gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 151/256: openssl: use OpenSSL's default ciphers by default, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 156/256: runtests.pl: support attribute "nonewline" in part verify/upload., gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 66/256: vtls: declare Curl_ssl structs for every SSL backend, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 36/256: scripts/contri*sh: use "git log --use-mailmap", gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 141/256: test1135: fixed after bd8070085f9, gnunet, 2017/10/06
- [GNUnet-SVN] [gnurl] 70/256: vtls: convert the have_curlssl_* constants to runtime flags, gnunet, 2017/10/06