From 62085ae46037adde1c3ef326b340e5af8eb7cadb Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Tue, 1 Jan 2013 23:20:04 +0000 Subject: [PATCH] afs: Add assertion to afs_cb_result_handler(). If cc is NULL we always have a bug, so it's OK to dereference this pointer unconditionally. However, if the command handler crashes due to cc being NULL, it is not obvious what has happened, so make this explicit. --- afs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/afs.c b/afs.c index 1f3fafac..906616d7 100644 --- a/afs.c +++ b/afs.c @@ -604,6 +604,7 @@ int afs_cb_result_handler(struct osl_object *result, uint8_t band, { struct command_context *cc = private; + assert(cc); if (!result->size) return 1; if (cc->use_sideband) -- 2.39.5