libkiconv: address memory leak in not-found cases
Found in "Understanding and Detecting Disordered Error Handling with Precise Function Pairing" by Qiushi Wu et al. Reviewed by: imp, jhb MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D29896
This commit is contained in:
parent
dc77e79296
commit
3cfd08c1c7
@ -59,6 +59,7 @@ kiconv_lookupconv(const char *drvname)
|
|||||||
free(drivers);
|
free(drivers);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
free(drivers);
|
||||||
}
|
}
|
||||||
return (ENOENT);
|
return (ENOENT);
|
||||||
}
|
}
|
||||||
@ -86,6 +87,7 @@ kiconv_lookupcs(const char *tocode, const char *fromcode)
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
free(csi);
|
||||||
}
|
}
|
||||||
return (ENOENT);
|
return (ENOENT);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user