The Image Manager 1024 no longer does a double free.
This commit is contained in:
@@ -133,6 +133,7 @@ extern void pgc_wake(pgc_t *);
|
|||||||
extern void pgc_sleep(pgc_t *);
|
extern void pgc_sleep(pgc_t *);
|
||||||
extern void pgc_setdisplay(pgc_t *, int cga);
|
extern void pgc_setdisplay(pgc_t *, int cga);
|
||||||
extern void pgc_speed_changed(void *priv);
|
extern void pgc_speed_changed(void *priv);
|
||||||
|
extern void pgc_close_common(void *priv);
|
||||||
extern void pgc_close(void *priv);
|
extern void pgc_close(void *priv);
|
||||||
extern void pgc_init(pgc_t *,
|
extern void pgc_init(pgc_t *,
|
||||||
int maxw, int maxh, int visw, int vish,
|
int maxw, int maxh, int visw, int vish,
|
||||||
|
@@ -1007,7 +1007,7 @@ im1024_close(void *priv)
|
|||||||
{
|
{
|
||||||
im1024_t *dev = (im1024_t *)priv;
|
im1024_t *dev = (im1024_t *)priv;
|
||||||
|
|
||||||
pgc_close(&dev->pgc);
|
pgc_close_common(&dev->pgc);
|
||||||
|
|
||||||
free(dev);
|
free(dev);
|
||||||
}
|
}
|
||||||
|
@@ -2600,7 +2600,7 @@ pgc_speed_changed(void *priv)
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
pgc_close(void *priv)
|
pgc_close_common(void *priv)
|
||||||
{
|
{
|
||||||
pgc_t *dev = (pgc_t *)priv;
|
pgc_t *dev = (pgc_t *)priv;
|
||||||
|
|
||||||
@@ -2633,6 +2633,15 @@ pgc_close(void *priv)
|
|||||||
free(dev->cga_vram);
|
free(dev->cga_vram);
|
||||||
if (dev->vram)
|
if (dev->vram)
|
||||||
free(dev->vram);
|
free(dev->vram);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
pgc_close(void *priv)
|
||||||
|
{
|
||||||
|
pgc_t *dev = (pgc_t *)priv;
|
||||||
|
|
||||||
|
pgc_close_common(priv);
|
||||||
|
|
||||||
free(dev);
|
free(dev);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user