--- daq_ipq.c.orig 2015-12-31 10:07:40.385365978 -0800 +++ daq_ipq.c 2015-12-31 10:10:11.605585290 -0800 @@ -435,6 +435,13 @@ free(impl->fcode.bf_insns); impl->filter = strdup(filter); + if ( !impl->filter ) + { + snprintf(errBuf, errMax, + "%s: can't allocate memory for device (%s)\n", + __FUNCTION__, filter); + return DAQ_ERROR; + } impl->fcode = fcode; return DAQ_SUCCESS;