Skip to content

Commit

Permalink
[compress] cleanup dlerror before dlopen for lzma
Browse files Browse the repository at this point in the history
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
  • Loading branch information
fabbione committed Aug 21, 2017
1 parent e6d275a commit 6025481
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libknet/compress_lzma.c
Expand Up @@ -22,7 +22,7 @@
/*
* global vars for dlopen
*/
static void* lzma_lib;
static void *lzma_lib;
static int lmza_libref = 0;

/*
Expand Down Expand Up @@ -89,6 +89,8 @@ int lzma_init(
/*
* clear any pending error
*/
dlerror();

lzma_lib = dlopen("liblzma.so.5", RTLD_LAZY | RTLD_GLOBAL);
error = dlerror();
if (error != NULL) {
Expand Down

0 comments on commit 6025481

Please sign in to comment.