* [PATCH] opensm/osm_qos_parser_y.y: fixing bunch of memory leaks on invalid values
@ 2010-09-07 15:17 Yevgeny Kliteynik
[not found] ` <4C8657A2.8020106-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Yevgeny Kliteynik @ 2010-09-07 15:17 UTC (permalink / raw)
To: Sasha Khapyorsky, Linux RDMA
Signed-off-by: Yevgeny Kliteynik <kliteyn-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
---
opensm/opensm/osm_qos_parser_y.y | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/opensm/opensm/osm_qos_parser_y.y b/opensm/opensm/osm_qos_parser_y.y
index 7118b79..d9830dc 100644
--- a/opensm/opensm/osm_qos_parser_y.y
+++ b/opensm/opensm/osm_qos_parser_y.y
@@ -763,6 +763,7 @@ qos_ulp: TK_ULP_DEFAULT single_number {
if (range_arr[i][0] > 0xFFFF || range_arr[i][1] > 0xFFFF)
{
yyerror("SDP port number out of range");
+ free(range_arr);
return 1;
}
range_arr[i][0] += OSM_QOS_POLICY_ULP_SDP_SERVICE_ID;
@@ -809,6 +810,7 @@ qos_ulp: TK_ULP_DEFAULT single_number {
if (range_arr[i][0] > 0xFFFF || range_arr[i][1] > 0xFFFF)
{
yyerror("SDP port number out of range");
+ free(range_arr);
return 1;
}
range_arr[i][0] += OSM_QOS_POLICY_ULP_RDS_SERVICE_ID;
@@ -855,6 +857,7 @@ qos_ulp: TK_ULP_DEFAULT single_number {
if (range_arr[i][0] > 0xFFFF || range_arr[i][1] > 0xFFFF)
{
yyerror("SDP port number out of range");
+ free(range_arr);
return 1;
}
range_arr[i][0] += OSM_QOS_POLICY_ULP_ISER_SERVICE_ID;
@@ -944,8 +947,10 @@ qos_ulp: TK_ULP_DEFAULT single_number {
* If some problem would be found, parsing will
* be aborted with a proper error messages.
*/
- if (__validate_pkeys(range_arr, range_len, TRUE))
+ if (__validate_pkeys(range_arr, range_len, TRUE)) {
+ free(range_arr);
return 1;
+ }
p_current_qos_match_rule->pkey_range_arr = range_arr;
p_current_qos_match_rule->pkey_range_len = range_len;
--
1.6.2.4
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] opensm/osm_qos_parser_y.y: fixing bunch of memory leaks on invalid values
[not found] ` <4C8657A2.8020106-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
@ 2010-11-30 16:35 ` Sasha Khapyorsky
0 siblings, 0 replies; 2+ messages in thread
From: Sasha Khapyorsky @ 2010-11-30 16:35 UTC (permalink / raw)
To: kliteyn-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb; +Cc: Linux RDMA
On 18:17 Tue 07 Sep , Yevgeny Kliteynik wrote:
>
> Signed-off-by: Yevgeny Kliteynik <kliteyn-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Applied. Thanks.
Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-11-30 16:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-07 15:17 [PATCH] opensm/osm_qos_parser_y.y: fixing bunch of memory leaks on invalid values Yevgeny Kliteynik
[not found] ` <4C8657A2.8020106-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
2010-11-30 16:35 ` Sasha Khapyorsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).