diff options
author | Michael Schroeder <mls@suse.de> | 2012-09-10 18:23:13 +0200 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2012-09-10 18:23:13 +0200 |
commit | d1b3a51b15d7d917af4b51fbb2f8de56dbf4254c (patch) | |
tree | 7b67f2617989d437904a1538d045e5e13a30c8de /ext | |
parent | 0cf35d7cd690dd7b3a39b02c75c6d456a0096a14 (diff) | |
download | libsolv-d1b3a51b15d7d917af4b51fbb2f8de56dbf4254c.tar.gz libsolv-d1b3a51b15d7d917af4b51fbb2f8de56dbf4254c.tar.bz2 libsolv-d1b3a51b15d7d917af4b51fbb2f8de56dbf4254c.zip |
- fix error handling in solv_xfopen_buf
Diffstat (limited to 'ext')
-rw-r--r-- | ext/solv_xfopen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/solv_xfopen.c b/ext/solv_xfopen.c index 4de122a..429086a 100644 --- a/ext/solv_xfopen.c +++ b/ext/solv_xfopen.c @@ -441,8 +441,8 @@ solv_xfopen_buf(const char *fn, char **bufp, size_t *buflp, const char *mode) bc->freemem = *bufp; if (!fp) { - *bc->bufp = solv_free(*bc->bufp); - *bc->buflp = 0; + if (*mode == 'w') + *bc->bufp = solv_free(*bc->bufp); cookie_bufclose(bc); } return fp; |