summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/userpref.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/userpref.c b/src/userpref.c
index 6e62000..4aab67b 100644
--- a/src/userpref.c
+++ b/src/userpref.c
@@ -328,8 +328,10 @@ static int userpref_get_file_contents(const char *file, gnutls_datum_t * data)
g_free(filepath);
/* Add it to the gnutls_datnum_t structure */
- data->data = (uint8_t*) content;
- data->size = size;
+ if (success) {
+ data->data = (uint8_t*) content;
+ data->size = size;
+ }
return success;
}