diff options
author | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2009-08-20 05:01:50 +0800 |
---|---|---|
committer | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2009-08-20 05:01:50 +0800 |
commit | b45ea481a667440b91676ff7505984145278e10c (patch) | |
tree | 5a556242643997618fb79b5d110c704425c88d7d | |
parent | 651c7095bf6fefec842661f0fb50b027f8719b98 (diff) | |
download | marcuscom-ports-b45ea481a667440b91676ff7505984145278e10c.tar marcuscom-ports-b45ea481a667440b91676ff7505984145278e10c.tar.gz marcuscom-ports-b45ea481a667440b91676ff7505984145278e10c.tar.bz2 marcuscom-ports-b45ea481a667440b91676ff7505984145278e10c.tar.lz marcuscom-ports-b45ea481a667440b91676ff7505984145278e10c.tar.xz marcuscom-ports-b45ea481a667440b91676ff7505984145278e10c.tar.zst marcuscom-ports-b45ea481a667440b91676ff7505984145278e10c.zip |
Be more careful about freeing memory.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@12665 df743ca5-7f9a-e211-a948-0013205c9059
-rw-r--r-- | sysutils/hal/files/patch-hald_freebsd_probing_probe-volume.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sysutils/hal/files/patch-hald_freebsd_probing_probe-volume.c b/sysutils/hal/files/patch-hald_freebsd_probing_probe-volume.c index 0544344c7..e933e3344 100644 --- a/sysutils/hal/files/patch-hald_freebsd_probing_probe-volume.c +++ b/sysutils/hal/files/patch-hald_freebsd_probing_probe-volume.c @@ -1,5 +1,5 @@ --- hald/freebsd/probing/probe-volume.c.orig 2008-08-10 09:50:10.000000000 -0400 -+++ hald/freebsd/probing/probe-volume.c 2009-08-19 16:54:15.000000000 -0400 ++++ hald/freebsd/probing/probe-volume.c 2009-08-19 17:00:14.000000000 -0400 @@ -36,7 +36,12 @@ #include <sys/disk.h> #include <sys/cdio.h> @@ -23,7 +23,7 @@ hf_probe_volume_advanced_disc_detect(fd); } else -@@ -555,6 +561,45 @@ main (int argc, char **argv) +@@ -555,6 +561,46 @@ main (int argc, char **argv) libhal_device_set_property_bool(hfp_ctx, hfp_udi, "volume.ignore", has_children || is_swap, &hfp_error); @@ -34,7 +34,7 @@ + if (ufs_disk_fillout(&ufsdisk, device_file) == 0) + { + char ufsid[64]; -+ char **ufs_devs; ++ char **ufs_devs = NULL; + int num_udis; + int i; + @@ -61,7 +61,8 @@ + } + } + } -+ libhal_free_string_array(ufs_devs); ++ if (ufs_devs) ++ libhal_free_string_array(ufs_devs); + ufs_disk_close(&ufsdisk); + } + } |