
On Thu, Aug 09, 2018 at 09:42:09AM +0530, Sukrit Bhatnagar wrote:
Add another usage for VIR_AUTOFREE macro which was left in the commit ec3e878, thereby dropping a VIR_FREE call and and a cleanup section.
Signed-off-by: Sukrit Bhatnagar <skrtbhtngr@gmail.com> --- src/util/viriscsi.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/src/util/viriscsi.c b/src/util/viriscsi.c index c805ffc..cf07968 100644 --- a/src/util/viriscsi.c +++ b/src/util/viriscsi.c @@ -208,9 +208,10 @@ static int virStorageBackendCreateIfaceIQN(const char *initiatoriqn, char **ifacename) { - int ret = -1, exitstatus = -1; + int exitstatus = -1; + VIR_AUTOPTR(virCommand) cmd = NULL; + VIR_AUTOFREE(char *) iface_name = NULL; VIR_AUTOFREE(char *) temp_ifacename = NULL; - VIR_AUTOPTR(virCommand) cmd = NULL;
^This @cmd movement is unjustified, I'll drop it before merging. Reviewed-by: Erik Skultety <eskultet@redhat.com>