Re: [PATCH] qede: fix write to free'd pointer error and double free of ptp

2019-04-12 Thread David Miller
From: Colin King Date: Fri, 12 Apr 2019 15:13:27 +0100 > From: Colin Ian King > > The err2 error return path calls qede_ptp_disable that cleans up > on an error and frees ptp. After this, the free'd ptp is dereferenced > when ptp->clock is set to NULL and the code falls-through to error > path

[PATCH] qede: fix write to free'd pointer error and double free of ptp

2019-04-12 Thread Colin King
From: Colin Ian King The err2 error return path calls qede_ptp_disable that cleans up on an error and frees ptp. After this, the free'd ptp is dereferenced when ptp->clock is set to NULL and the code falls-through to error path err1 that frees ptp again. Fix this by calling qede_ptp_disable and