lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <x49r3rax566.fsf@segfault.boston.devel.redhat.com>
Date:	Thu, 23 Apr 2015 10:58:25 -0400
From:	Jeff Moyer <jmoyer@...hat.com>
To:	Chao Yu <chao2.yu@...sung.com>
Cc:	axboe@...nel.dk, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] elevator: remove unneeded kfree in error path of elevator_alloc

Chao Yu <chao2.yu@...sung.com> writes:

> In elevator_alloc, if we fail to allocate memory for storing elevator
> queue, our eq pointer must be NULL, we do not need to release it in error
> path, so remove it.
>
> Signed-off-by: Chao Yu <chao2.yu@...sung.com>
> ---
>  block/elevator.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/block/elevator.c b/block/elevator.c
> index 59794d0..d146a5e 100644
> --- a/block/elevator.c
> +++ b/block/elevator.c
> @@ -166,7 +166,6 @@ struct elevator_queue *elevator_alloc(struct request_queue *q,
>  
>  	return eq;
>  err:
> -	kfree(eq);
>  	elevator_put(e);
>  	return NULL;
>  }

Acked-by: Jeff Moyer <jmoyer@...hat.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ