if (cfg == NULL)
         return USER_CONFIGURATION_NOT_ADDED;

     grp = cfg_get_single_group(cfg, octstr_imm("ppg"));
     if ((ppg_url = cfg_get(grp, octstr_imm("ppg-url"))) == NULL)

The code snippet above crashes if grp is NULL.

I suggest that the

     if (cfg == NULL)

is replaced with

     if (cfg == NULL || cfg_get_single_group(cfg, octstr_imm("ppg")) ==
NULL) {

(evaluation is left to right I think :-))

Paul Keogh
ANAM Wireless Internet Solutions
http://www.anam.com
+353 1 284 7555 (wired)               +353 86 234 6047 (wireless)
Castle Yard, Saint Patrick's Road, Dalkey, County Dublin, Ireland



Reply via email to