public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/curl] curl-v8.21.0-9: fix memory leak in src/main.c (accepted by upstream)
@ 2026-11-02 14:26 Kamil Dudka
0 siblings, 0 replies; only message in thread
From: Kamil Dudka @ 2026-11-02 14:26 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/curl
Branch : curl-v8.21.0-9
Commit : 8acdb5038c5b8f9433edfae79a3c7dfd180e6a16
Author : Kamil Dudka <kdudka@fedoraproject.org>
Date : 2009-03-12T10:20:53+00:00
Stats : +47/-2 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/curl/c/8acdb5038c5b8f9433edfae79a3c7dfd180e6a16?branch=curl-v8.21.0-9
Log:
fix memory leak in src/main.c (accepted by upstream)
---
diff --git a/curl-7.19.4-tool-leak.patch b/curl-7.19.4-tool-leak.patch
new file mode 100644
index 0000000..ccb84ef
--- /dev/null
+++ b/curl-7.19.4-tool-leak.patch
@@ -0,0 +1,39 @@
+diff -ruNp curl-7.19.4.orig/include/curl/curl.h curl-7.19.4/include/curl/curl.h
+--- curl-7.19.4.orig/include/curl/curl.h 2009-03-03 00:05:31.000000000 +0100
++++ curl-7.19.4/include/curl/curl.h 2009-03-10 14:49:47.017943954 +0100
+@@ -1510,7 +1510,7 @@ CURL_EXTERN void curl_free(void *p);
+ * DESCRIPTION
+ *
+ * curl_global_init() should be invoked exactly once for each application that
+- * uses libcurl
++ * uses libcurl and before any call of other libcurl function
+ */
+ CURL_EXTERN CURLcode curl_global_init(long flags);
+
+diff -ruNp curl-7.19.4.orig/src/main.c curl-7.19.4/src/main.c
+--- curl-7.19.4.orig/src/main.c 2009-02-17 10:10:21.000000000 +0100
++++ curl-7.19.4/src/main.c 2009-03-10 14:49:50.297971916 +0100
+@@ -3969,6 +3969,12 @@ operate(struct Configurable *config, int
+
+ memset(&heads, 0, sizeof(struct OutStruct));
+
++ /* initialize curl library - do not call any libcurl functions before */
++ if (main_init() != CURLE_OK) {
++ helpf(config->errors, "error initializing curl library\n");
++ return CURLE_FAILED_INIT;
++ }
++
+ #ifdef CURLDEBUG
+ /* this sends all memory debug messages to a logfile named memdump */
+ env = curlx_getenv("CURL_MEMDEBUG");
+@@ -4015,10 +4021,6 @@ operate(struct Configurable *config, int
+ #endif
+
+ /* inits */
+- if (main_init() != CURLE_OK) {
+- helpf(config->errors, "error initializing curl library\n");
+- return CURLE_FAILED_INIT;
+- }
+ config->postfieldsize = -1;
+ config->showerror=TRUE;
+ config->use_httpget=FALSE;
diff --git a/curl.spec b/curl.spec
index b198f62..68851ad 100644
--- a/curl.spec
+++ b/curl.spec
@@ -1,13 +1,14 @@
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
Name: curl
Version: 7.19.4
-Release: 3%{?dist}
+Release: 4%{?dist}
License: MIT
Group: Applications/Internet
Source: http://curl.haxx.se/download/%{name}-%{version}.tar.bz2
Patch1: curl-7.15.3-multilib.patch
Patch2: curl-7.16.0-privlibs.patch
Patch3: curl-7.17.1-badsocket.patch
+Patch4: curl-7.19.4-tool-leak.patch
Provides: webclient
URL: http://curl.haxx.se/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -52,6 +53,7 @@ use cURL's capabilities internally.
%patch1 -p1 -b .multilib
%patch2 -p1 -b .privlibs
%patch3 -p1 -b .badsocket
+%patch4 -p1 -b .toolleak
# Convert docs to UTF-8
for f in CHANGES README; do
@@ -89,7 +91,7 @@ install -m 644 docs/libcurl/libcurl.m4 $RPM_BUILD_ROOT/%{_datadir}/aclocal
%define _curlbuild32_h curlbuild-32.h
%define _curlbuild64_h curlbuild-64.h
-%ifarch ppc64 s390x x86_64 ia64 alpha sparc64
+%if %{__isa_bits} == 64
%define _curlbuild_h %{_curlbuild64_h}
%else
%define _curlbuild_h %{_curlbuild32_h}
@@ -143,6 +145,10 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/aclocal/libcurl.m4
%changelog
+* Thu Mar 12 2009 Kamil Dudka <kdudka@redhat.com> 7.19.4-4
+- fix memory leak in src/main.c (accepted by upstream)
+- avoid using %ifarch
+
* Wed Mar 11 2009 Kamil Dudka <kdudka@redhat.com> 7.19.4-3
- make libcurl-devel multilib-ready (bug #488922)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-02 14:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-02 14:26 [rpms/curl] curl-v8.21.0-9: fix memory leak in src/main.c (accepted by upstream) Kamil Dudka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox