~ubuntu-branches/ubuntu/wily/weechat/wily

« back to all changes in this revision

Viewing changes to src/core/wee-secure.c

  • Committer: Package Import Robot
  • Author(s): Emmanuel Bouthenot
  • Date: 2014-02-13 12:11:54 UTC
  • mfrom: (29.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20140213121154-k6sdmtnralvjbmgq
Tags: 0.4.3-2
* Add missing symlink for Polish manpage
* Change ruby-* Build-Depends to gem2deb so that ruby plugin will be
  built against the newest Ruby interpreter available (Closes: #738685)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * wee-secure.c - secured data configuration options (file sec.conf)
3
3
 *
4
 
 * Copyright (C) 2013 Sebastien Helleu <flashcode@flashtux.org>
 
4
 * Copyright (C) 2013-2014 Sébastien Helleu <flashcode@flashtux.org>
5
5
 *
6
6
 * This file is part of WeeChat, the extensible chat client.
7
7
 *
1100
1100
 
1101
1101
    rc = config_file_read (secure_config_file);
1102
1102
 
1103
 
    if (rc != WEECHAT_CONFIG_READ_OK)
1104
 
    {
1105
 
        gui_chat_printf (NULL,
1106
 
                         _("%sError reading configuration"),
1107
 
                         gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]);
1108
 
    }
1109
 
 
1110
1103
    return rc;
1111
1104
}
1112
1105
 
1343
1336
 
1344
1337
    secure_buffer_display ();
1345
1338
}
 
1339
 
 
1340
/*
 
1341
 * Frees all allocated data.
 
1342
 */
 
1343
 
 
1344
void
 
1345
secure_end ()
 
1346
{
 
1347
    if (secure_passphrase)
 
1348
    {
 
1349
        free (secure_passphrase);
 
1350
        secure_passphrase = NULL;
 
1351
    }
 
1352
    if (secure_hashtable_data)
 
1353
    {
 
1354
        hashtable_free (secure_hashtable_data);
 
1355
        secure_hashtable_data = NULL;
 
1356
    }
 
1357
    if (secure_hashtable_data_encrypted)
 
1358
    {
 
1359
        hashtable_free (secure_hashtable_data_encrypted);
 
1360
        secure_hashtable_data_encrypted = NULL;
 
1361
    }
 
1362
}