Apply an upstream patch to pair new[] with delete[]
This commit is contained in:
parent
154ea3f969
commit
2d23cf62de
62
libproxy-0.4.12-use-correct-delete.patch
Normal file
62
libproxy-0.4.12-use-correct-delete.patch
Normal file
@ -0,0 +1,62 @@
|
||||
From 6efcbd3fa0944b499180c7bc860d38c1b18c97f1 Mon Sep 17 00:00:00 2001
|
||||
From: Fabian Vogt <fabian@ritter-vogt.de>
|
||||
Date: Tue, 16 Feb 2016 22:13:56 +0100
|
||||
Subject: [PATCH] Fix mismatched new[]/delete in pacrunner_natus and _webkit
|
||||
|
||||
---
|
||||
libproxy/modules/pacrunner_natus.cpp | 4 ++--
|
||||
libproxy/modules/pacrunner_webkit.cpp | 6 +++---
|
||||
2 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/libproxy/modules/pacrunner_natus.cpp b/libproxy/modules/pacrunner_natus.cpp
|
||||
index ce79943..72ef6ff 100644
|
||||
--- a/libproxy/modules/pacrunner_natus.cpp
|
||||
+++ b/libproxy/modules/pacrunner_natus.cpp
|
||||
@@ -43,14 +43,14 @@ static Value dnsResolve(Value& ths, Value& fnc, vector<Value>& arg) {
|
||||
NULL, 0,
|
||||
NI_NUMERICHOST)) {
|
||||
freeaddrinfo(info);
|
||||
- delete tmp;
|
||||
+ delete[] tmp;
|
||||
return NULL;
|
||||
}
|
||||
freeaddrinfo(info);
|
||||
|
||||
// Create the return value
|
||||
Value ret = ths.newString(tmp);
|
||||
- delete tmp;
|
||||
+ delete[] tmp;
|
||||
return ret;
|
||||
}
|
||||
|
||||
diff --git a/libproxy/modules/pacrunner_webkit.cpp b/libproxy/modules/pacrunner_webkit.cpp
|
||||
index c51b869..bef2056 100644
|
||||
--- a/libproxy/modules/pacrunner_webkit.cpp
|
||||
+++ b/libproxy/modules/pacrunner_webkit.cpp
|
||||
@@ -58,7 +58,7 @@ static JSValueRef dnsResolve(JSContextRef ctx, JSObjectRef /*func*/, JSObjectRef
|
||||
struct addrinfo *info;
|
||||
if (getaddrinfo(tmp, NULL, NULL, &info))
|
||||
return NULL;
|
||||
- delete tmp;
|
||||
+ delete[] tmp;
|
||||
|
||||
// Try for IPv4
|
||||
tmp = new char[INET6_ADDRSTRLEN+1];
|
||||
@@ -67,7 +67,7 @@ static JSValueRef dnsResolve(JSContextRef ctx, JSObjectRef /*func*/, JSObjectRef
|
||||
NULL, 0,
|
||||
NI_NUMERICHOST)) {
|
||||
freeaddrinfo(info);
|
||||
- delete tmp;
|
||||
+ delete[] tmp;
|
||||
return NULL;
|
||||
}
|
||||
freeaddrinfo(info);
|
||||
@@ -76,7 +76,7 @@ static JSValueRef dnsResolve(JSContextRef ctx, JSObjectRef /*func*/, JSObjectRef
|
||||
JSStringRef str = JSStringCreateWithUTF8CString(tmp);
|
||||
JSValueRef ret = JSValueMakeString(ctx, str);
|
||||
JSStringRelease(str);
|
||||
- delete tmp;
|
||||
+ delete[] tmp;
|
||||
|
||||
return ret;
|
||||
}
|
@ -15,6 +15,7 @@ Source0: https://github.com/libproxy/%{name}/archive/%{version}.tar.gz
|
||||
Patch0: 0001-Add-config-module-for-querying-PacRunner-d-mon.patch
|
||||
# Taken from upstream git.
|
||||
Patch1: libproxy-0.4.12-javascriptcoregtk4.patch
|
||||
Patch2: libproxy-0.4.12-use-correct-delete.patch
|
||||
|
||||
BuildRequires: python2-devel
|
||||
BuildRequires: libmodman-devel >= 2.0.1
|
||||
@ -145,6 +146,7 @@ developing applications that use %{name}.
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
%{cmake} \
|
||||
@ -223,6 +225,7 @@ make test
|
||||
- Use license macro for COPYING
|
||||
- Use pkgconfig for BuildRequires
|
||||
- Use javascriptcoregtk-4.0
|
||||
- Apply an upstream patch to pair new[] with delete[]
|
||||
|
||||
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.11-13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
Loading…
Reference in New Issue
Block a user