diff options
Diffstat (limited to 'fs/cifs/misc.c')
| -rw-r--r-- | fs/cifs/misc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c index 812c6bb0fe38..0f3ebad09d3e 100644 --- a/fs/cifs/misc.c +++ b/fs/cifs/misc.c | |||
| @@ -72,10 +72,9 @@ sesInfoAlloc(void) | |||
| 72 | struct cifsSesInfo *ret_buf; | 72 | struct cifsSesInfo *ret_buf; |
| 73 | 73 | ||
| 74 | ret_buf = | 74 | ret_buf = |
| 75 | (struct cifsSesInfo *) kmalloc(sizeof (struct cifsSesInfo), | 75 | (struct cifsSesInfo *) kzalloc(sizeof (struct cifsSesInfo), |
| 76 | GFP_KERNEL); | 76 | GFP_KERNEL); |
| 77 | if (ret_buf) { | 77 | if (ret_buf) { |
| 78 | memset(ret_buf, 0, sizeof (struct cifsSesInfo)); | ||
| 79 | write_lock(&GlobalSMBSeslock); | 78 | write_lock(&GlobalSMBSeslock); |
| 80 | atomic_inc(&sesInfoAllocCount); | 79 | atomic_inc(&sesInfoAllocCount); |
| 81 | ret_buf->status = CifsNew; | 80 | ret_buf->status = CifsNew; |
| @@ -110,10 +109,9 @@ tconInfoAlloc(void) | |||
| 110 | { | 109 | { |
| 111 | struct cifsTconInfo *ret_buf; | 110 | struct cifsTconInfo *ret_buf; |
| 112 | ret_buf = | 111 | ret_buf = |
| 113 | (struct cifsTconInfo *) kmalloc(sizeof (struct cifsTconInfo), | 112 | (struct cifsTconInfo *) kzalloc(sizeof (struct cifsTconInfo), |
| 114 | GFP_KERNEL); | 113 | GFP_KERNEL); |
| 115 | if (ret_buf) { | 114 | if (ret_buf) { |
| 116 | memset(ret_buf, 0, sizeof (struct cifsTconInfo)); | ||
| 117 | write_lock(&GlobalSMBSeslock); | 115 | write_lock(&GlobalSMBSeslock); |
| 118 | atomic_inc(&tconInfoAllocCount); | 116 | atomic_inc(&tconInfoAllocCount); |
| 119 | list_add(&ret_buf->cifsConnectionList, | 117 | list_add(&ret_buf->cifsConnectionList, |
