DESC
Do proper strdup() error checking
EDESC

Check for strdup() failures (it can fail if we're low on mem (ie. malloc()
fails)).

Thanks to David Hill for pointing this out.

