Project

General

Profile

lighttpd-1.4.19.memory.leak.patch

patch to resolve memory leak - qhy, 2008-09-20 12:17

View differences:

request.c 2008-09-20 20:03:14.000000000 +0800
825 825
												"request-header:\n",
826 826
												con->request.request);
827 827
									}
828
									ds->free((data_unset*)ds);
828 829
									return 0;
829 830
								}
830 831

  
......
839 840
										con->http_status = 400;
840 841
										con->keep_alive = 0;
841 842

  
842
										array_insert_unique(con->request.headers, (data_unset *)ds);
843
										ds->free((data_unset*)ds);
843 844
										return 0;
844 845
									}
845 846
								}
......
856 857
									con->http_status = 400;
857 858
									con->keep_alive = 0;
858 859

  
859
									array_insert_unique(con->request.headers, (data_unset *)ds);
860
									ds->free((data_unset*)ds);
860 861
									return 0;
861 862
								}
862 863
							} else if (cmp > 0 && 0 == (cmp = buffer_caseless_compare(CONST_BUF_LEN(ds->key), CONST_STR_LEN("Content-Type")))) {
......
874 875
												"request-header:\n",
875 876
												con->request.request);
876 877
									}
878
									ds->free((data_unset*)ds);
877 879
									return 0;
878 880
								}
879 881
							} else if (cmp > 0 && 0 == (cmp = buffer_caseless_compare(CONST_BUF_LEN(ds->key), CONST_STR_LEN("Expect")))) {
......
911 913
												"request-header:\n",
912 914
												con->request.request);
913 915
									}
916
									ds->free((data_unset*)ds);
914 917
									return 0;
915 918
								}
916 919
							} else if (cmp > 0 && 0 == (cmp = buffer_caseless_compare(CONST_BUF_LEN(ds->key), CONST_STR_LEN("If-Modified-Since")))) {
......
936 939
												"request-header:\n",
937 940
												con->request.request);
938 941
									}
942
									ds->free((data_unset*)ds);
939 943
									return 0;
940 944
								}
941 945
							} else if (cmp > 0 && 0 == (cmp = buffer_caseless_compare(CONST_BUF_LEN(ds->key), CONST_STR_LEN("If-None-Match")))) {
......
953 957
												"request-header:\n",
954 958
												con->request.request);
955 959
									}
960
									ds->free((data_unset*)ds);
956 961
									return 0;
957 962
								}
958 963
							} else if (cmp > 0 && 0 == (cmp = buffer_caseless_compare(CONST_BUF_LEN(ds->key), CONST_STR_LEN("Range")))) {
......
976 981
												"request-header:\n",
977 982
												con->request.request);
978 983
									}
984
									ds->free((data_unset*)ds);
979 985
									return 0;
980 986
								}
981 987
							}