Fixed a crash in error handling (free_modres called on NULL)
Fixed a crash in error handling (free_modres called on NULL)

Better to make this accept NULL the way most free_XXX functions do.

Change-Id: Idd60072a589797bd82d1b20ecc04cfca6b0a9dde
Reviewed-on: http://review.couchbase.org/14862
Tested-by: Damien Katz <99e6b749acbfbe2a596df99e91d24d6e1fdbee00@couchbase.com>
Reviewed-by: Damien Katz <99e6b749acbfbe2a596df99e91d24d6e1fdbee00@couchbase.com>

jimwwalker/couchstore,hsharsha/couchstore,abhinavdangeti/couchstore,hsharsha/couchstore,jimwwalker/couchstore,vmx/couchstore,abhinavdangeti/couchstore,t3rm1n4l/couchstore,t3rm1n4l/couchstore,couchbaselabs/couchstore-specials,couchbaselabs/couchstore-specials,couchbaselabs/couchstore-specials,t3rm1n4l/couchstore,hsharsha/couchstore,couchbaselabs/couchstore-specials,couchbaselabs/couchstore-specials,jimwwalker/couchstore,couchbaselabs/couchstore,couchbaselabs/couchstore,vmx/couchstore,hsharsha/couchstore,couchbaselabs/couchstore,abhinavdangeti/couchstore,vmx/couchstore