]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
Fix double-free and broken logic in virt-login-shell
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 9 Aug 2013 10:59:55 +0000 (11:59 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Fri, 9 Aug 2013 11:55:59 +0000 (12:55 +0100)
commitac692e3af231651304a93d63cb54049d9e3d50f8
treebfb15ac56273522e531d41f0d1cbc8d01c85602c
parentf905cc998449c89339d0e2894a71d9a9e45293e5
Fix double-free and broken logic in virt-login-shell

The virLoginShellAllowedUser method must not free the 'groups'
parameter it is given, as that is owned by the caller.

The virLoginShellAllowedUser method should be checking
'!*ptr' (ie empty string) rather than '!ptr' (NULL string)
since the latter cannot be true.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
tools/virt-login-shell.c