You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libcmis/0003-coverity-avoid-possibl...

26 lines
834 B

From b65d92d8e3e53f4fe16f7d6be3fec1525bdb4ee0 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Tue, 1 Mar 2016 10:06:48 +0100
Subject: [PATCH 03/37] coverity: avoid possible memory leak
---
qa/mockup/mockup-config.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qa/mockup/mockup-config.cxx b/qa/mockup/mockup-config.cxx
index 043b03e..f830fff 100644
--- a/qa/mockup/mockup-config.cxx
+++ b/qa/mockup/mockup-config.cxx
@@ -353,7 +353,7 @@ char* curl_mockup_HttpRequest_getHeader( const struct HttpRequest* request, cons
{
char* value = NULL;
size_t i = 0;
- while ( request->headers[i] != NULL )
+ while ( request->headers[i] != NULL && value == NULL )
{
string header = request->headers[i];
const string prefix = string( name ) + ":";
--
2.5.0