diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2009-12-21 15:09:08 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2009-12-21 15:09:08 +0000 |
commit | 1ba2246e3d69640715d0739c2a0d27de1910e8da (patch) | |
tree | efa91ddaef65ffd1a89c980f5aac71392c3561b3 | |
parent | bc5d79c90cf4b49ba2ca45cb0314fdd5eff8cac2 (diff) | |
download | upstream-1ba2246e3d69640715d0739c2a0d27de1910e8da.tar.gz upstream-1ba2246e3d69640715d0739c2a0d27de1910e8da.tar.bz2 upstream-1ba2246e3d69640715d0739c2a0d27de1910e8da.zip |
[package] opkg: fix invalid free triggered by 011-old-config-location.patch and replace 012-cleanup-tmpdir.patch with upstream fix
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18879 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | package/opkg/patches/011-old-config-location.patch | 2 | ||||
-rw-r--r-- | package/opkg/patches/012-cleanup-tmpdir.patch | 37 |
2 files changed, 31 insertions, 8 deletions
diff --git a/package/opkg/patches/011-old-config-location.patch b/package/opkg/patches/011-old-config-location.patch index 40d0b75665..518993b254 100644 --- a/package/opkg/patches/011-old-config-location.patch +++ b/package/opkg/patches/011-old-config-location.patch @@ -7,7 +7,7 @@ - + + if(!conf->conf_file) -+ conf->conf_file = "/etc/opkg.conf"; ++ conf->conf_file = xstrdup("/etc/opkg.conf"); + if (parse_err) return parse_err; diff --git a/package/opkg/patches/012-cleanup-tmpdir.patch b/package/opkg/patches/012-cleanup-tmpdir.patch index f6d5e8732d..d794a070e1 100644 --- a/package/opkg/patches/012-cleanup-tmpdir.patch +++ b/package/opkg/patches/012-cleanup-tmpdir.patch @@ -1,12 +1,35 @@ --- a/src/opkg-cl.c +++ b/src/opkg-cl.c -@@ -333,6 +333,9 @@ +@@ -263,7 +263,7 @@ + int + main(int argc, char *argv[]) + { +- int opts; ++ int opts, err = -1; + char *cmd_name; + opkg_cmd_t *cmd; + int nocheckfordirorfile = 0; +@@ -327,15 +327,8 @@ + usage(); + } + +- if (opkg_cmd_exec(cmd, argc - opts, (const char **) (argv + opts))) +- goto err2; ++ err = opkg_cmd_exec(cmd, argc - opts, (const char **) (argv + opts)); + +- print_error_list(); +- free_error_list(); +- +- return 0; +- +-err2: + #ifdef HAVE_CURL + opkg_curl_cleanup(); + #endif +@@ -346,5 +339,5 @@ print_error_list(); free_error_list(); -+ if( conf->tmp_dir ) -+ rm_r(conf->tmp_dir); -+ - return 0; - - err2: +- return -1; ++ return err; + } |