diff options
Diffstat (limited to 'wk5')
-rw-r--r-- | wk5/lect/list.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/wk5/lect/list.c b/wk5/lect/list.c index 6b343c5..5ccfe7f 100644 --- a/wk5/lect/list.c +++ b/wk5/lect/list.c @@ -14,6 +14,10 @@ int main(void) list[2] = 3; int *tmp = malloc(4 * sizeof(int)); + if (list == NULL) + { + return 1; + } for (int i = 0; i < 3; i++) { |