diff options
| author | 2013-02-01 01:08:19 +0100 | |
|---|---|---|
| committer | 2013-02-01 01:08:19 +0100 | |
| commit | 6370bf5477692ca434ca388ba1bf37ed6be7d123 (patch) | |
| tree | 037dd6d57d3cb9dd41c44f82869c2e509ecd7753 /tools/idevicebackup2.c | |
| parent | 1eff94c02a2f72debb73d2983724c193e42fd9d4 (diff) | |
| download | libimobiledevice-6370bf5477692ca434ca388ba1bf37ed6be7d123.tar.gz libimobiledevice-6370bf5477692ca434ca388ba1bf37ed6be7d123.tar.bz2 | |
idevicebackup2: fix invalid free in mkdir_with_parents
Diffstat (limited to 'tools/idevicebackup2.c')
| -rw-r--r-- | tools/idevicebackup2.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/idevicebackup2.c b/tools/idevicebackup2.c index 0426d43..8f094c8 100644 --- a/tools/idevicebackup2.c +++ b/tools/idevicebackup2.c | |||
| @@ -197,9 +197,9 @@ static int mkdir_with_parents(const char *dir, int mode) | |||
| 197 | } | 197 | } |
| 198 | int res; | 198 | int res; |
| 199 | char *parent = strdup(dir); | 199 | char *parent = strdup(dir); |
| 200 | parent = dirname(parent); | 200 | char *parentdir = dirname(parent); |
| 201 | if (parent) { | 201 | if (parentdir) { |
| 202 | res = mkdir_with_parents(parent, mode); | 202 | res = mkdir_with_parents(parentdir, mode); |
| 203 | } else { | 203 | } else { |
| 204 | res = -1; | 204 | res = -1; |
| 205 | } | 205 | } |
