Re: [PATCH 4/5] trace-cmd: Add context to compression hooks

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

 



On Wed,  2 Mar 2022 06:51:30 +0200
"Tzvetomir Stoyanov (VMware)" <tz.stoyanov@xxxxxxxxx> wrote:

> @@ -453,6 +460,8 @@ struct tracecmd_compression *tracecmd_compress_alloc(const char *name, const cha
>  void tracecmd_compress_destroy(struct tracecmd_compression *handle)
>  {
>  	tracecmd_compress_reset(handle);
> +	if (handle->proto->free_context)
> +		handle->proto->free_context(handle->context);
>  	free(handle);
>  }
>  

I segfaulted here with:

	# trace-cmd restore -c -o /tmp/head

Need to test handle is NULL or not.

Perhaps even just exit normally at the start?

	if (!handle)
		return;

Which makes it not crash.

-- Steve



[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux