libcdio-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Libcdio-devel] [PATCH 2/2] udf: fix memory leak in udf_open()


From: Rocky Bernstein
Subject: Re: [Libcdio-devel] [PATCH 2/2] udf: fix memory leak in udf_open()
Date: Mon, 16 Jan 2012 19:44:18 -0500

On Mon, Jan 16, 2012 at 6:29 PM, Pete Batard <address@hidden> wrote:

> Follow up to previous patch with a leak in udf_open().
>

> This can be problematic if you call on udf_open() with an image, to find
> out if it's UDF or not for instance.
>

We'll try it. Patch applied. Thanks again.


> Regards,
>
> /Pete
>
> From 508dd1c44696954a8808e51377aff69deae7f834 Mon Sep 17 00:00:00 2001
> From: Pete Batard <address@hidden>
> Date: Mon, 16 Jan 2012 20:05:19 +0000
> Subject: [PATCH] udf: fix memory leak in udf_open()
>
> * also fix typo in udf_get_root() comment
> ---
>  lib/udf/udf_fs.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/lib/udf/udf_fs.c b/lib/udf/udf_fs.c
> index 6d1e833..e5900c7 100644
> --- a/lib/udf/udf_fs.c
> +++ b/lib/udf/udf_fs.c
> @@ -404,6 +404,7 @@ udf_open (const char *psz_path)
>   return p_udf;
>
>  error:
> +  cdio_stdio_destroy(p_udf->stream);
>   free(p_udf);
>   return NULL;
>  }
> @@ -473,7 +474,7 @@ udf_get_volumeset_id(udf_t *p_udf, /*out*/ uint8_t
> *volsetid,
>   NULL is returned if the partition is not found or a root is not found or
>   there is on error.
>
> -  Caller must free result - use udf_file_free for that.
> +  Caller must free result - use udf_dirent_free for that.
>  */
>  udf_dirent_t *
>  udf_get_root (udf_t *p_udf, bool b_any_partition, partition_num_t
> i_partition)
> --
> 1.7.8.msysgit.0
>
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]