mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
At the moment, do_control_lu() will set errno to 0 before calling lu_arch() and then check errno. The expectation is nothing in lu_arch() will change the value unless there is an error. However, per errno(3), a function that succeeds is allowed to change errno. In fact, syslog() will overwrite errno if the logs are rotated at the time it is called. To prevent any further issue, errno is now always set before returning NULL. Additionally, errno is only checked when returning NULL so the client can see the error message if there is any. Reported-by: Michael Kurth <mku@amazon.com> Signed-off-by: Julien Grall <jgrall@amazon.com> Reviewed-by: Juergen Gross <jgross@suse.com>
The following files are imported from the Samba project. We use the versions from Samba 3, the current stable branch. talloc.c: samba-trunk/source/lib/talloc.c r14291 2006-03-13 04:27:47 +0000 talloc.h: samba-trunk/source/include/talloc.h r11986 2005-12-01 00:43:36 +0000