From: Andre Noll Date: Tue, 1 Jan 2013 23:20:04 +0000 (+0000) Subject: afs: Add assertion to afs_cb_result_handler(). X-Git-Tag: v0.4.13~53 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=62085ae46037adde1c3ef326b340e5af8eb7cadb 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. --- 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)