All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/4] Fix possible memory leak on SIM reading error.
@ 2009-07-30  8:05 Andrzej Zaborowski
  2009-07-31 15:09 ` Denis Kenzior
  0 siblings, 1 reply; 4+ messages in thread
From: Andrzej Zaborowski @ 2009-07-30  8:05 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 622 bytes --]

This would also stall the SIM op queue if there's a read error for a record
other than the first.  The other solution would be "goto next;" (keep
reading further records).
---
 src/sim.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/src/sim.c b/src/sim.c
index deab6bd..695744f 100644
--- a/src/sim.c
+++ b/src/sim.c
@@ -317,9 +317,7 @@ static void sim_op_retrieve_cb(const struct ofono_error *error,
 	int fd;
 
 	if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
-		if (op->current == 1)
-			sim_op_error(modem);
-
+		sim_op_error(modem);
 		return;
 	}
 
-- 
1.6.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-08-03 17:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-30  8:05 [PATCH 3/4] Fix possible memory leak on SIM reading error Andrzej Zaborowski
2009-07-31 15:09 ` Denis Kenzior
2009-08-01 22:46   ` Andrzej Zaborowski
2009-08-03 17:46     ` Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.