Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci-2.6.23
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci-2.6.23
Commits
eafff86d
Commit
eafff86d
authored
Nov 17, 2006
by
Arnaldo Carvalho de Melo
Committed by
David S. Miller
Dec 02, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NETROM]: Use kmemdup
Signed-off-by:
Arnaldo Carvalho de Melo
<
acme@mandriva.com
>
parent
0459d70a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
net/netrom/nr_route.c
net/netrom/nr_route.c
+7
-5
No files found.
net/netrom/nr_route.c
View file @
eafff86d
...
@@ -155,14 +155,15 @@ static int nr_add_node(ax25_address *nr, const char *mnemonic, ax25_address *ax2
...
@@ -155,14 +155,15 @@ static int nr_add_node(ax25_address *nr, const char *mnemonic, ax25_address *ax2
atomic_set
(
&
nr_neigh
->
refcount
,
1
);
atomic_set
(
&
nr_neigh
->
refcount
,
1
);
if
(
ax25_digi
!=
NULL
&&
ax25_digi
->
ndigi
>
0
)
{
if
(
ax25_digi
!=
NULL
&&
ax25_digi
->
ndigi
>
0
)
{
if
((
nr_neigh
->
digipeat
=
kmalloc
(
sizeof
(
*
ax25_digi
),
GFP_KERNEL
))
==
NULL
)
{
nr_neigh
->
digipeat
=
kmemdup
(
ax25_digi
,
sizeof
(
*
ax25_digi
),
GFP_KERNEL
);
if
(
nr_neigh
->
digipeat
==
NULL
)
{
kfree
(
nr_neigh
);
kfree
(
nr_neigh
);
if
(
nr_node
)
if
(
nr_node
)
nr_node_put
(
nr_node
);
nr_node_put
(
nr_node
);
return
-
ENOMEM
;
return
-
ENOMEM
;
}
}
memcpy
(
nr_neigh
->
digipeat
,
ax25_digi
,
sizeof
(
*
ax25_digi
));
}
}
spin_lock_bh
(
&
nr_neigh_list_lock
);
spin_lock_bh
(
&
nr_neigh_list_lock
);
...
@@ -432,11 +433,12 @@ static int nr_add_neigh(ax25_address *callsign, ax25_digi *ax25_digi, struct net
...
@@ -432,11 +433,12 @@ static int nr_add_neigh(ax25_address *callsign, ax25_digi *ax25_digi, struct net
atomic_set
(
&
nr_neigh
->
refcount
,
1
);
atomic_set
(
&
nr_neigh
->
refcount
,
1
);
if
(
ax25_digi
!=
NULL
&&
ax25_digi
->
ndigi
>
0
)
{
if
(
ax25_digi
!=
NULL
&&
ax25_digi
->
ndigi
>
0
)
{
if
((
nr_neigh
->
digipeat
=
kmalloc
(
sizeof
(
*
ax25_digi
),
GFP_KERNEL
))
==
NULL
)
{
nr_neigh
->
digipeat
=
kmemdup
(
ax25_digi
,
sizeof
(
*
ax25_digi
),
GFP_KERNEL
);
if
(
nr_neigh
->
digipeat
==
NULL
)
{
kfree
(
nr_neigh
);
kfree
(
nr_neigh
);
return
-
ENOMEM
;
return
-
ENOMEM
;
}
}
memcpy
(
nr_neigh
->
digipeat
,
ax25_digi
,
sizeof
(
*
ax25_digi
));
}
}
spin_lock_bh
(
&
nr_neigh_list_lock
);
spin_lock_bh
(
&
nr_neigh_list_lock
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment