diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-07-05 16:32:34 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-07-05 16:32:34 +0200 |
commit | e31c1d4a9f78c4e31fda1f98fe349b33abdd01a2 (patch) | |
tree | 61df772a93f7f21af7c715ddd4b9a3f1a50e0509 /src/transport/tcp_service_legacy.c | |
parent | 1437556645417e6302862845e7ebcbd4c9908357 (diff) | |
download | gnunet-e31c1d4a9f78c4e31fda1f98fe349b33abdd01a2.tar.gz gnunet-e31c1d4a9f78c4e31fda1f98fe349b33abdd01a2.zip |
GNUNET_free_non_null -> GNUNET_free
Diffstat (limited to 'src/transport/tcp_service_legacy.c')
-rw-r--r-- | src/transport/tcp_service_legacy.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/transport/tcp_service_legacy.c b/src/transport/tcp_service_legacy.c index fb4e9c3c9..12dce3993 100644 --- a/src/transport/tcp_service_legacy.c +++ b/src/transport/tcp_service_legacy.c | |||
@@ -657,7 +657,7 @@ LEGACY_SERVICE_get_server_addresses ( | |||
657 | (EACCES == errno)) | 657 | (EACCES == errno)) |
658 | { | 658 | { |
659 | LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "socket"); | 659 | LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "socket"); |
660 | GNUNET_free_non_null (hostname); | 660 | GNUNET_free (hostname); |
661 | GNUNET_free (unixpath); | 661 | GNUNET_free (unixpath); |
662 | return GNUNET_SYSERR; | 662 | return GNUNET_SYSERR; |
663 | } | 663 | } |
@@ -683,7 +683,7 @@ LEGACY_SERVICE_get_server_addresses ( | |||
683 | _ ( | 683 | _ ( |
684 | "Have neither PORT nor UNIXPATH for service `%s', but one is required\n"), | 684 | "Have neither PORT nor UNIXPATH for service `%s', but one is required\n"), |
685 | service_name); | 685 | service_name); |
686 | GNUNET_free_non_null (hostname); | 686 | GNUNET_free (hostname); |
687 | return GNUNET_SYSERR; | 687 | return GNUNET_SYSERR; |
688 | } | 688 | } |
689 | if (0 == port) | 689 | if (0 == port) |
@@ -691,8 +691,8 @@ LEGACY_SERVICE_get_server_addresses ( | |||
691 | saddrs = GNUNET_malloc (2 * sizeof(struct sockaddr *)); | 691 | saddrs = GNUNET_malloc (2 * sizeof(struct sockaddr *)); |
692 | saddrlens = GNUNET_malloc (2 * sizeof(socklen_t)); | 692 | saddrlens = GNUNET_malloc (2 * sizeof(socklen_t)); |
693 | add_unixpath (saddrs, saddrlens, unixpath, abstract); | 693 | add_unixpath (saddrs, saddrlens, unixpath, abstract); |
694 | GNUNET_free_non_null (unixpath); | 694 | GNUNET_free (unixpath); |
695 | GNUNET_free_non_null (hostname); | 695 | GNUNET_free (hostname); |
696 | *addrs = saddrs; | 696 | *addrs = saddrs; |
697 | *addr_lens = saddrlens; | 697 | *addr_lens = saddrlens; |
698 | return 1; | 698 | return 1; |
@@ -716,7 +716,7 @@ LEGACY_SERVICE_get_server_addresses ( | |||
716 | hostname, | 716 | hostname, |
717 | gai_strerror (ret)); | 717 | gai_strerror (ret)); |
718 | GNUNET_free (hostname); | 718 | GNUNET_free (hostname); |
719 | GNUNET_free_non_null (unixpath); | 719 | GNUNET_free (unixpath); |
720 | return GNUNET_SYSERR; | 720 | return GNUNET_SYSERR; |
721 | } | 721 | } |
722 | next = res; | 722 | next = res; |
@@ -736,7 +736,7 @@ LEGACY_SERVICE_get_server_addresses ( | |||
736 | hostname); | 736 | hostname); |
737 | freeaddrinfo (res); | 737 | freeaddrinfo (res); |
738 | GNUNET_free (hostname); | 738 | GNUNET_free (hostname); |
739 | GNUNET_free_non_null (unixpath); | 739 | GNUNET_free (unixpath); |
740 | return GNUNET_SYSERR; | 740 | return GNUNET_SYSERR; |
741 | } | 741 | } |
742 | resi = i; | 742 | resi = i; |
@@ -843,7 +843,7 @@ LEGACY_SERVICE_get_server_addresses ( | |||
843 | ((struct sockaddr_in *) saddrs[i])->sin_port = htons (port); | 843 | ((struct sockaddr_in *) saddrs[i])->sin_port = htons (port); |
844 | } | 844 | } |
845 | } | 845 | } |
846 | GNUNET_free_non_null (unixpath); | 846 | GNUNET_free (unixpath); |
847 | *addrs = saddrs; | 847 | *addrs = saddrs; |
848 | *addr_lens = saddrlens; | 848 | *addr_lens = saddrlens; |
849 | return resi; | 849 | return resi; |
@@ -1024,7 +1024,7 @@ write_pid_file (struct LEGACY_SERVICE_Context *sctx, pid_t pid) | |||
1024 | { | 1024 | { |
1025 | LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "access", rdir); | 1025 | LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "access", rdir); |
1026 | GNUNET_free (rdir); | 1026 | GNUNET_free (rdir); |
1027 | GNUNET_free_non_null (user); | 1027 | GNUNET_free (user); |
1028 | GNUNET_free (pif); | 1028 | GNUNET_free (pif); |
1029 | return GNUNET_SYSERR; | 1029 | return GNUNET_SYSERR; |
1030 | } | 1030 | } |
@@ -1034,7 +1034,7 @@ write_pid_file (struct LEGACY_SERVICE_Context *sctx, pid_t pid) | |||
1034 | { | 1034 | { |
1035 | LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "fopen", pif); | 1035 | LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "fopen", pif); |
1036 | GNUNET_free (pif); | 1036 | GNUNET_free (pif); |
1037 | GNUNET_free_non_null (user); | 1037 | GNUNET_free (user); |
1038 | return GNUNET_SYSERR; | 1038 | return GNUNET_SYSERR; |
1039 | } | 1039 | } |
1040 | if (0 > fprintf (pidfd, "%u", pid)) | 1040 | if (0 > fprintf (pidfd, "%u", pid)) |
@@ -1042,7 +1042,7 @@ write_pid_file (struct LEGACY_SERVICE_Context *sctx, pid_t pid) | |||
1042 | GNUNET_break (0 == fclose (pidfd)); | 1042 | GNUNET_break (0 == fclose (pidfd)); |
1043 | if ((NULL != user) && (0 < strlen (user))) | 1043 | if ((NULL != user) && (0 < strlen (user))) |
1044 | GNUNET_DISK_file_change_owner (pif, user); | 1044 | GNUNET_DISK_file_change_owner (pif, user); |
1045 | GNUNET_free_non_null (user); | 1045 | GNUNET_free (user); |
1046 | GNUNET_free (pif); | 1046 | GNUNET_free (pif); |
1047 | return GNUNET_OK; | 1047 | return GNUNET_OK; |
1048 | } | 1048 | } |
@@ -1441,7 +1441,7 @@ LEGACY_SERVICE_run (int argc, | |||
1441 | /* shutdown */ | 1441 | /* shutdown */ |
1442 | if ((1 == do_daemonize) && (NULL != sctx.server)) | 1442 | if ((1 == do_daemonize) && (NULL != sctx.server)) |
1443 | pid_file_delete (&sctx); | 1443 | pid_file_delete (&sctx); |
1444 | GNUNET_free_non_null (sctx.my_handlers); | 1444 | GNUNET_free (sctx.my_handlers); |
1445 | 1445 | ||
1446 | shutdown: | 1446 | shutdown: |
1447 | if (-1 != sctx.ready_confirm_fd) | 1447 | if (-1 != sctx.ready_confirm_fd) |
@@ -1475,16 +1475,16 @@ shutdown: | |||
1475 | if (NULL != sctx.addrs) | 1475 | if (NULL != sctx.addrs) |
1476 | while (NULL != sctx.addrs[i]) | 1476 | while (NULL != sctx.addrs[i]) |
1477 | GNUNET_free_nz (sctx.addrs[i++]); | 1477 | GNUNET_free_nz (sctx.addrs[i++]); |
1478 | GNUNET_free_non_null (sctx.addrs); | 1478 | GNUNET_free (sctx.addrs); |
1479 | GNUNET_free_non_null (sctx.addrlens); | 1479 | GNUNET_free (sctx.addrlens); |
1480 | GNUNET_free_non_null (logfile); | 1480 | GNUNET_free (logfile); |
1481 | GNUNET_free_non_null (loglev); | 1481 | GNUNET_free (loglev); |
1482 | GNUNET_free (cfg_fn); | 1482 | GNUNET_free (cfg_fn); |
1483 | GNUNET_free_non_null (opt_cfg_fn); | 1483 | GNUNET_free (opt_cfg_fn); |
1484 | GNUNET_free_non_null (sctx.v4_denied); | 1484 | GNUNET_free (sctx.v4_denied); |
1485 | GNUNET_free_non_null (sctx.v6_denied); | 1485 | GNUNET_free (sctx.v6_denied); |
1486 | GNUNET_free_non_null (sctx.v4_allowed); | 1486 | GNUNET_free (sctx.v4_allowed); |
1487 | GNUNET_free_non_null (sctx.v6_allowed); | 1487 | GNUNET_free (sctx.v6_allowed); |
1488 | 1488 | ||
1489 | return err ? GNUNET_SYSERR : sctx.ret; | 1489 | return err ? GNUNET_SYSERR : sctx.ret; |
1490 | } | 1490 | } |
@@ -1626,7 +1626,7 @@ LEGACY_SERVICE_stop (struct LEGACY_SERVICE_Context *sctx) | |||
1626 | } | 1626 | } |
1627 | if (NULL != sctx->server) | 1627 | if (NULL != sctx->server) |
1628 | GNUNET_SERVER_destroy (sctx->server); | 1628 | GNUNET_SERVER_destroy (sctx->server); |
1629 | GNUNET_free_non_null (sctx->my_handlers); | 1629 | GNUNET_free (sctx->my_handlers); |
1630 | if (NULL != sctx->addrs) | 1630 | if (NULL != sctx->addrs) |
1631 | { | 1631 | { |
1632 | i = 0; | 1632 | i = 0; |
@@ -1634,11 +1634,11 @@ LEGACY_SERVICE_stop (struct LEGACY_SERVICE_Context *sctx) | |||
1634 | GNUNET_free_nz (sctx->addrs[i++]); | 1634 | GNUNET_free_nz (sctx->addrs[i++]); |
1635 | GNUNET_free (sctx->addrs); | 1635 | GNUNET_free (sctx->addrs); |
1636 | } | 1636 | } |
1637 | GNUNET_free_non_null (sctx->addrlens); | 1637 | GNUNET_free (sctx->addrlens); |
1638 | GNUNET_free_non_null (sctx->v4_denied); | 1638 | GNUNET_free (sctx->v4_denied); |
1639 | GNUNET_free_non_null (sctx->v6_denied); | 1639 | GNUNET_free (sctx->v6_denied); |
1640 | GNUNET_free_non_null (sctx->v4_allowed); | 1640 | GNUNET_free (sctx->v4_allowed); |
1641 | GNUNET_free_non_null (sctx->v6_allowed); | 1641 | GNUNET_free (sctx->v6_allowed); |
1642 | GNUNET_free (sctx); | 1642 | GNUNET_free (sctx); |
1643 | } | 1643 | } |
1644 | 1644 | ||