Re: [PATCH spice-server 14/15] jpeg encoder: Remove unused jpeg_encoder_destroy

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

 



Are you sure we're not just leaking the encoder right now? Perhaps we should be
calling this function somewhere. Same for lz4_encoder_destroy().



On Thu, 2015-11-19 at 20:45 +0100, Pavel Grunt wrote:
> It was introduced in 263646a1f7e705766f7d46017679812d4b1406b8
> but never used.
> 
> Signed-off-by: Pavel Grunt <pgrunt@xxxxxxxxxx>
> ---
>  server/jpeg_encoder.c | 6 ------
>  server/jpeg_encoder.h | 1 -
>  2 files changed, 7 deletions(-)
> 
> diff --git a/server/jpeg_encoder.c b/server/jpeg_encoder.c
> index 0296e9b..0e72621 100644
> --- a/server/jpeg_encoder.c
> +++ b/server/jpeg_encoder.c
> @@ -98,12 +98,6 @@ JpegEncoderContext*
> jpeg_encoder_create(JpegEncoderUsrContext *usr)
>      return (JpegEncoderContext*)enc;
>  }
>  
> -void jpeg_encoder_destroy(JpegEncoderContext* encoder)
> -{
> -    jpeg_destroy_compress(&((JpegEncoder*)encoder)->cinfo);
> -    free(encoder);
> -}
> -
>  static void convert_RGB16_to_RGB24(void *line, int width, uint8_t **out_line)
>  {
>      uint16_t *src_line = line;
> diff --git a/server/jpeg_encoder.h b/server/jpeg_encoder.h
> index 690a029..5c94b93 100644
> --- a/server/jpeg_encoder.h
> +++ b/server/jpeg_encoder.h
> @@ -51,7 +51,6 @@ struct JpegEncoderUsrContext {
>  };
>  
>  JpegEncoderContext* jpeg_encoder_create(JpegEncoderUsrContext *usr);
> -void jpeg_encoder_destroy(JpegEncoderContext *encoder);
>  
>  /* returns the total size of the encoded data. Images must be supplied from
> the
>     top line to the bottom */
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]