Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F40091
uart_subr.diff
All Users
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
araujo
Oct 22 2014, 3:20 AM
2014-10-22 03:20:28 (UTC+0)
Size
990 B
Referenced Files
None
Subscribers
None
uart_subr.diff
View Options
Index: sys/dev/uart/uart_subr.c
===================================================================
--- sys/dev/uart/uart_subr.c (revision 273379)
+++ sys/dev/uart/uart_subr.c (working copy)
@@ -267,12 +267,12 @@
di->bas.rclk = uart_parse_long(&spec);
break;
default:
- return (EINVAL);
+ goto out;
}
if (*spec == '\0')
break;
if (*spec != ',')
- return (EINVAL);
+ goto out;
spec++;
}
@@ -281,7 +281,7 @@
* missing an I/O port or memory address. We don't like that.
*/
if (addr == ~0U)
- return (EINVAL);
+ goto out;
/*
* Accept only the well-known baudrates. Any invalid baudrate
@@ -306,5 +306,12 @@
di->ops = uart_getops(class);
error = bus_space_map(di->bas.bst, addr, uart_getrange(class), 0,
&di->bas.bsh);
+ if (spec != NULL)
+ spec = NULL;
return (error);
+
+out:
+ if (spec != NULL)
+ spec = NULL;
+ return (EINVAL);
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
39991
Default Alt Text
uart_subr.diff (990 B)
Attached To
Mode
D981: Coverity CID 1248848 - Leaked Storage Variable.
Attached
Detach File
Event Timeline
Log In to Comment