Changeset ddbbcffa for logging.c


Ignore:
Timestamp:
Feb 11, 2011, 4:31:42 PM (14 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.10, release-1.8, release-1.9
Children:
d4927a7
Parents:
35b6eb9
git-author:
Anders Kaseorg <andersk@mit.edu> (08/27/09 00:52:41)
git-committer:
Anders Kaseorg <andersk@mit.edu> (02/11/11 16:31:42)
Message:
Replace owl_free with g_free.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Karl Ramm <kcr@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • logging.c

    r96828e4 rddbbcffa  
    7979    fprintf(file, "From: %s <%s>\n\n", owl_message_get_zsig(m), tmp);
    8080    fprintf(file, "%s\n\n", owl_message_get_body(m));
    81     owl_free(tmp);
     81    g_free(tmp);
    8282}
    8383
     
    142142      owl_log_append(m, filename);
    143143
    144       owl_free(temp);
    145       owl_free(cc->data);
     144      g_free(temp);
     145      g_free(cc->data);
    146146      cc = g_list_delete_link(cc, cc);
    147147    }
     
    156156    temp2 = g_utf8_strdown(temp,-1);
    157157    to = owl_sprintf("aim:%s", temp2);
    158     owl_free(temp2);
    159     owl_free(temp);
     158    g_free(temp2);
     159    g_free(temp);
    160160  } else {
    161161    to = owl_strdup("loopback");
     
    164164  snprintf(filename, MAXPATHLEN, "%s/%s", logpath, to);
    165165  owl_log_append(m, filename);
    166   owl_free(to);
     166  g_free(to);
    167167
    168168  snprintf(filename, MAXPATHLEN, "%s/all", logpath);
    169169  owl_log_append(m, filename);
    170   owl_free(logpath);
     170  g_free(logpath);
    171171}
    172172
     
    200200  if (!file) {
    201201    owl_function_error("Unable to open file for outgoing logging");
    202     owl_free(logpath);
    203     owl_free(tobuff);
     202    g_free(logpath);
     203    g_free(tobuff);
    204204    return;
    205205  }
     
    211211
    212212  snprintf(filename, MAXPATHLEN, "%s/all", logpath);
    213   owl_free(logpath);
     213  g_free(logpath);
    214214  file=fopen(filename, "a");
    215215  if (!file) {
    216216    owl_function_error("Unable to open file for outgoing logging");
    217     owl_free(tobuff);
     217    g_free(tobuff);
    218218    return;
    219219  }
     
    224224  fclose(file);
    225225
    226   owl_free(tobuff);
     226  g_free(tobuff);
    227227}
    228228
     
    270270    normalto = g_utf8_strdown(temp, -1);
    271271    from=frombuff=owl_sprintf("aim:%s", normalto);
    272     owl_free(normalto);
    273     owl_free(temp);
     272    g_free(normalto);
     273    g_free(temp);
    274274  } else if (owl_message_is_type_loopback(m)) {
    275275    from=frombuff=owl_strdup("loopback");
     
    302302      char* temp = g_utf8_strdown(frombuff, -1);
    303303      if (temp) {
    304         owl_free(frombuff);
     304        g_free(frombuff);
    305305        from = frombuff = temp;
    306306      }
     
    336336      }
    337337
    338       owl_free(temp);
    339       owl_free(cc->data);
     338      g_free(temp);
     339      g_free(cc->data);
    340340      cc = g_list_delete_link(cc, cc);
    341341    }
    342342  }
    343343
    344   owl_free(frombuff);
    345   owl_free(logpath);
    346 }
     344  g_free(frombuff);
     345  g_free(logpath);
     346}
Note: See TracChangeset for help on using the changeset viewer.