From 98ec4ec797e2bd5ebafa53ce433375dde4bca487 Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 09 2020 19:54:59 +0000 Subject: Apply patch libpaper-covscan.patch patch_name: libpaper-covscan.patch present_in_specfile: true --- diff --git a/lib/paper.c b/lib/paper.c index 57db599..8817aea 100644 --- a/lib/paper.c +++ b/lib/paper.c @@ -211,7 +211,10 @@ PAPERSIZEVAR, fall-back to the old behaviour. fclose(ps); paperstr = malloc((strlen(papername) + 1) * sizeof(char)); - if (! paperstr) return 0; + if (! paperstr) { + free(papername); + return 0; + } strcpy(paperstr, papername); free(papername);