dtcm: Coverity 89138
authorPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 21:59:44 +0000 (22:59 +0100)
committerPeter Howkins <flibble@users.sf.net>
Wed, 4 Jul 2018 21:59:44 +0000 (22:59 +0100)
cde/programs/dtcm/dtcm/calendarA.c

index 40a43cea0dfb93116bd86f05ed5c4446283482e8..88843f3fdbe18bc32b51ddb2cdecfadc0634ee3d 100644 (file)
@@ -2220,7 +2220,7 @@ open_initial_calendar(
        Calendar        *c,
        CSA_return_code *status)
 {
-       char            buf[MAXNAMELEN], *loc, *user;
+       char            buf[MAXNAMELEN], *loc, *user = NULL;
        CSA_flags       flags = 0;
        CSA_extension   cb_ext;
        CSA_extension   logon_ext;
@@ -2233,6 +2233,7 @@ open_initial_calendar(
 
        if ((loc = cm_target2location(c->view->current_calendar)) == NULL) {
                error_noloc(c, c->view->current_calendar);
+               free(user);
                return False;
        }