Permalink
Browse files

modhtp: Reorder NULL check (CID 1190270).

  • Loading branch information...
1 parent 6bc43c5 commit 743cd69a31d5b40494a750b399386f7cf0c82e39 @b1v1r b1v1r committed Mar 6, 2014
Showing with 5 additions and 5 deletions.
  1. +5 −5 modules/modhtp.c
View
10 modules/modhtp.c
@@ -345,18 +345,18 @@ static ib_status_t modhtp_param_iter_callback(
ib_field_t *field;
ib_status_t rc;
- /* Ignore if from wrong source */
- if (param->source != idata->source) {
- return IB_OK;
- }
-
/* The param needs to be non-NULL, however an assert is inappropriate
* as this is dependent on libHTP, not IronBee. */
if (param == NULL) {
ib_log_info_tx(tx, "param NULL");
return IB_EINVAL;
}
+ /* Ignore if from wrong source */
+ if (param->source != idata->source) {
+ return IB_OK;
+ }
+
/* Treat a NULL param->value as a zero length buffer. */
if (param->value == NULL) {
/* Create an empty value. */

0 comments on commit 743cd69

Please sign in to comment.