[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Avoid accessing invalid memory.
From: |
Diego Nieto Cid |
Subject: |
[PATCH] Avoid accessing invalid memory. |
Date: |
Fri, 19 Nov 2010 01:13:47 -0300 |
* console/console.c (vcons_lookup): unlock using cons instead of vcons->cons.
---
console/console.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/console/console.c b/console/console.c
index dad7516..d8306dd 100644
--- a/console/console.c
+++ b/console/console.c
@@ -227,7 +227,7 @@ vcons_lookup (cons_t cons, int id, int create, vcons_t
*r_vcons)
vcons = calloc (1, sizeof (struct vcons));
if (!vcons)
{
- mutex_unlock (&vcons->cons->lock);
+ mutex_unlock (&cons->lock);
return ENOMEM;
}
vcons->cons = cons;
@@ -244,7 +244,7 @@ vcons_lookup (cons_t cons, int id, int create, vcons_t
*r_vcons)
{
free (vcons->name);
free (vcons);
- mutex_unlock (&vcons->cons->lock);
+ mutex_unlock (&cons->lock);
return err;
}
@@ -254,7 +254,7 @@ vcons_lookup (cons_t cons, int id, int create, vcons_t
*r_vcons)
display_destroy (vcons->display);
free (vcons->name);
free (vcons);
- mutex_unlock (&vcons->cons->lock);
+ mutex_unlock (&cons->lock);
return err;
}
--
1.7.3.2
- [PATCH] Avoid accessing invalid memory.,
Diego Nieto Cid <=