lkml.org 
[lkml]   [2023]   [Oct]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] nvme-tcp: Fix a memory leak
On Sun, Oct 29, 2023 at 10:22:57PM +0100, Christophe JAILLET wrote:
> if (ctype != TLS_RECORD_TYPE_DATA) {
> pr_err("queue %d: unhandled TLS record %d\n",
> nvme_tcp_queue_id(queue), ctype);
> - return -ENOTCONN;
> + ret = -ENOTCONN;
> + goto free_icresp;
> }
> }
> ret = -EINVAL;

I'd slightly prefer the code to be consistent how it assigns to err,
and use the style where it is assigned in the main path as with the
-EINVAL for the next checks.

Except for that this looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>

\
 
 \ /
  Last update: 2023-10-30 14:30    [W:0.117 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site