1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

s3: Fix Coverity ID 242754 Dereference null return value

This commit is contained in:
Volker Lendecke 2012-05-09 10:41:06 +02:00
parent d716a9bd06
commit 4e05717559

View File

@ -121,7 +121,7 @@ static bool eventlog_add_source( const char *eventlog, const char *sourcename,
goto done;
}
relpath = strchr(evtlogpath, '\\');
relpath = evtlogpath + sizeof(KEY_EVENTLOG);
hive_name = talloc_strndup(ctx, evtlogpath, relpath - evtlogpath);
if (!hive_name) {
d_printf("Out of memory\n");