Changeset 8e755c6


Ignore:
Timestamp:
Jul 24, 2011, 7:05:53 PM (10 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
release-1.8
Children:
4f8535e
Parents:
efef058
git-author:
David Benjamin <davidben@mit.edu> (07/24/11 18:23:21)
git-committer:
David Benjamin <davidben@mit.edu> (07/24/11 19:05:53)
Message:
Fix missing NULL check on anyone list return value

Error handling changed in ecffae6c5b3fd57d8ca74cd2ba142098748bfe7c.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    r25f2e21 r8e755c6  
    34743474
    34753475  anyone = owl_zephyr_get_anyone_list(NULL);
    3476   for (i = 0; i < anyone->len; i++) {
    3477     user = anyone->pdata[i];
    3478     zald = g_new(ZAsyncLocateData_t, 1);
    3479     if (ZRequestLocations(zstr(user), zald, UNACKED, ZAUTH) == ZERR_NONE) {
    3480       *zaldlist = g_list_append(*zaldlist, zald);
    3481     } else {
    3482       g_free(zald);
    3483     }
    3484   }
    3485 
    3486   owl_ptr_array_free(anyone, g_free);
     3476  if (anyone != NULL) {
     3477    for (i = 0; i < anyone->len; i++) {
     3478      user = anyone->pdata[i];
     3479      zald = g_new(ZAsyncLocateData_t, 1);
     3480      if (ZRequestLocations(zstr(user), zald, UNACKED, ZAUTH) == ZERR_NONE) {
     3481        *zaldlist = g_list_append(*zaldlist, zald);
     3482      } else {
     3483        g_free(zald);
     3484      }
     3485    }
     3486    owl_ptr_array_free(anyone, g_free);
     3487  }
    34873488#endif
    34883489}
Note: See TracChangeset for help on using the changeset viewer.