Whamcloud - gitweb
LU-2394 llog: Fix a NULL pointer dereference
If llog_cat_id2handle fails and returns a positive value, it may free
its 'res' parameter and set it to NULL. Thus, a caller must be cautious
not to cause a NULL pointer dereference on error.
This patch fixes the cat_cancel_cb function, keeping it from dereferencing
this potentially NULL pointer.
In addition, any console message regarding a failed call to
llog_cat_id2handle in llog_cat.c now outputs the same message.
Signed-off-by: Prakash Surya <surya1@llnl.gov>
Change-Id: I949b558d0ea4569685e8ed85b7a920b2dca548c3
Reviewed-on: http://review.whamcloud.com/4676
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Mike Pershin <tappro@whamcloud.com>