tools: Tiny clean-ups for two functions in virsh-completer.c
These two functions were duplicating some cleanup paths, so let's just merge both cleanup and error paths together. To distinguish whether we need to clean-up the return value let's keep it in @tmp until the function is successful in which case we set @ret to the value of @tmp and set @tmp to NULL. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
Showing
想要评论请 注册 或 登录