We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fdb54d9 commit 8ba388cCopy full SHA for 8ba388c
lib/dhry_1.c
@@ -139,8 +139,15 @@ int dhry(int n)
139
140
/* Initializations */
141
142
- Next_Ptr_Glob = (Rec_Pointer)kzalloc(sizeof(Rec_Type), GFP_KERNEL);
143
- Ptr_Glob = (Rec_Pointer)kzalloc(sizeof(Rec_Type), GFP_KERNEL);
+ Next_Ptr_Glob = (Rec_Pointer)kzalloc(sizeof(Rec_Type), GFP_ATOMIC);
+ if (!Next_Ptr_Glob)
144
+ return -ENOMEM;
145
+
146
+ Ptr_Glob = (Rec_Pointer)kzalloc(sizeof(Rec_Type), GFP_ATOMIC);
147
+ if (!Ptr_Glob) {
148
+ kfree(Next_Ptr_Glob);
149
150
+ }
151
152
Ptr_Glob->Ptr_Comp = Next_Ptr_Glob;
153
Ptr_Glob->Discr = Ident_1;
0 commit comments