diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-04-10 22:30:54 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-04-10 22:30:54 +0000 |
commit | 2ceb03531d1ad99ffbd1acb9462d817a3a5bfe5a (patch) | |
tree | 4060054b8fa2d7d3b9c264c78b939b84aa4d4782 | |
parent | 67ee132e8d2e6ca73432cf11702c15877df1dfdd (diff) |
Wed, Apr 10, 2024, 3:30 PM -07:00
-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++) { |