Commit c6591af0 authored by Marcin Spiewak's avatar Marcin Spiewak Committed by Konrad Sztyber
Browse files

lib/thread: fixed potential dereferencing of NULL pointer



Fixed issue indicated by Klocwork scan. 'name', which potentially
might be NULL, is passed as function parameter. Now the function
name will not point to NULL, and will be the same in interrupt
structure and in event handler.

Change-Id: I5588821139d11288a96f5041703d5b7b71890ad6
Signed-off-by: default avatarMarcin Spiewak <marcin.spiewak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17356


Community-CI: Mellanox Build Bot
Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent d69516f5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2811,7 +2811,7 @@ spdk_interrupt_register(int efd, spdk_interrupt_fn fn,
	intr->fn = fn;
	intr->arg = arg;

	ret = spdk_fd_group_add(thread->fgrp, efd, _interrupt_wrapper, intr, name);
	ret = spdk_fd_group_add(thread->fgrp, efd, _interrupt_wrapper, intr, intr->name);

	if (ret != 0) {
		SPDK_ERRLOG("thread %s: failed to add fd %d: %s\n",